On 2024-03-05, Christian Brabandt wrote:
> Hm, thanks for your suggestion. I have mad a very quick patch here:
> chrisbra@fe4a04a
> 
> This misses test so is not yet ready to be included, but you may want to try 
> it
> out.

We should probably understand what Vim is doing now and why before
making severe changes and possibly reinventing rules.

While I agree that Vim's behavior can appear random, I do appreciate
that it seems to try to minimize scrolling and surprising jumps.
For example, when using % to jump between the top and bottom of
a block delimited by { and } or by #if and #endif, if the target
line is just off the top or bottom of the screen, Vim will scroll
the screen just a bit so that the target line and the cursor are at
the top or bottom line of the screen, as appropriate.

My guess is that there is a parameter somewhere in the code that
tells Vim, "if the screen would need to be scrolled less than
N lines to display the target line, scroll as little as possible;
otherwise, jump and center the cursor."

Maybe it would be sufficient to let users adjust that parameter, if
it exists.

Regards,
Gary

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20240305222828.GB2578%40phoenix.

Raspunde prin e-mail lui