scrolloff=X to guarantee min lines above/below scroll

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
sirksel
Junior Member
Junior Member
Posts: 61
Joined: 2013-04-24, 10:24 UTC

scrolloff=X to guarantee min lines above/below scroll

Post by *sirksel »

Mr. Ghisler, would it be possible to add one small feature to the wincmd.ini file -- one that would guarantee a certain number of lines above/below the cursor when scrolling up/down using pgup/pgdn/arrows or typing a filename using quicksearch? You might call it scrolloff, and set the default to scrolloff=0, so as not to change the default behavior for everyone else. (I'm borrowing that name scrolloff from "set scrolloff" in Vim, which has similar functionality to what I'm requesting.)

Here is the use case... When I have a long file listing with similar versions or names, I often have to scroll one or two past the file I am quicksearch-typing or arrow-keying to, only because I want to be sure I have the last one in the series. Then I have to up-arrow a couple of times to get back to the file I want to do something with. If I were able to set scrolloff=3, I would always know if I am on the last one because I could already see the next few -- even though I am at the bottom of the screen and scrolling off and downward. There is a similar use case for looking for the first in a long series of files when scrolling off in the upward direction.

I know you are very busy, but I am hoping this might be a small change. Is it possible (pretty please) that you might be able to include it into the current 9.0 beta series? Thanks so much for everything you do to make Total Commander such a great program for all of us!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48113
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Unfortunately this would be very hard to implement because there are so many ways to change the location in the list that it's almost impossible to catch them all...
Author of Total Commander
https://www.ghisler.com
sirksel
Junior Member
Junior Member
Posts: 61
Joined: 2013-04-24, 10:24 UTC

Post by *sirksel »

Mr. Ghisler, thanks for your note back. That makes sense to me.

Just to clarify my request, I would say that I would ONLY expect a setting like this to work against movement with the arrow keys, PgUp/PgDown, and the most importantly, QuickSearch typing, and it could be documented as such. I wouldn't be looking for this to work with mouse actions, scroll wheel, rubberband-selection, drag-drop, a list reaction to a paste or to new files on a refresh, etc.

Here's a potential solution that could get to 90% of what I'm asking with less work, I think: What about if you made a QuickSearchScrollOff=3 option that ONLY applies to QuickSearch typing? It would eliminate for me hundreds of keystrokes per day. Again, the use case that happens all the time is... I'm QuickSearch typing (letter-only option) to select from a long list of files and I want to be able to know at a glance whether there's a file series that extends beyond the one that just matched. So almost every time, I have to press Down, Down to see what's below and then Up, Up to get back to the match.

As a last resort fallback, maybe you could just non-optionally change the QuickSearch typing behavior itself (and if it helps, just in the downward direction only) such that if there are files scrolled off-screen below the matched file to which the cursor jumps, then you automatically scroll the view one or two lines down into them -- so the match isn't the last line on the screen. You could just leave it at that -- no option, no wincmd.ini setting. Just let me see a file or two beyond what I've matched with QuickSearch as the default behavior.

The answer still may be the same, I just wanted to clarify and reduce my request to the most essential elements, in case you end up looking at it again in the future. Thanks again for all your hard work on this great software!
Post Reply