Skip to content
This repository has been archived by the owner on Dec 6, 2022. It is now read-only.

Issue with files longer than 94 lines #16

Open
alvinbunk opened this issue Sep 25, 2019 · 1 comment
Open

Issue with files longer than 94 lines #16

alvinbunk opened this issue Sep 25, 2019 · 1 comment

Comments

@alvinbunk
Copy link

I really love your plugin; it makes some of my work really easy!
I noticed that if the number of line in a file is greater than 94, there are some issues with the way the Elastic Tabstops appears. I've given a sample screenshot below with irrelevant data so you can see the issue. The file size is 100 lines of the exact same rows (data doesn't matter), and when you put your mouse at the 100th line and click to "Enable" Elastic Tabstops, it will look offset like in the screenshot.

I often use Alt-C with left mouse click to select column mode and insert needed tabs. But with this bug, after line 94, the alignment goes all wacky. The workaround is to put the mouse further down the file and disable and re-name Elastic Tabstops.
ElasticTabStopsBug

@rkapl123
Copy link

rkapl123 commented Sep 30, 2019

I think that this is rather a consequence of restricting the tabstop stretching to the current view:

void ElasticTabstopsComputeCurrentView() {
int linesOnScreen = editor.LinesOnScreen();
startLine = editor.GetFirstVisibleLine();
endLine = startLine + linesOnScreen + 1;
// Expand up to 1 "screen" worth in both directions
startLine -= linesOnScreen;
endLine += linesOnScreen;
startLine = __max(startLine, 0);
endLine = __min(endLine, editor.GetLineCount());
clear_debug_marks();
stretch_tabstops(startLine, endLine, 0);
}

It would be interesting to make that configurable, as the workaround described by alvinbunk didn't work for me (I've got too many lines between the header-row and the data to be displayed aligned).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants