ElasticTabstops icon indicating copy to clipboard operation
ElasticTabstops copied to clipboard

Issue with files longer than 94 lines

Open alvinbunk opened this issue 5 years ago • 1 comments

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

alvinbunk avatar Sep 25 '19 17:09 alvinbunk

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).

rkapl123 avatar Sep 30 '19 08:09 rkapl123