Tuesday, April 10, 2018

Re: "zz" vs ":echo"


zz centers the cursor in the window *vertically* by scrolling the window.  This is why the window is scrolling.  When the cursor is above the 1/2 the screen height, zz doesn't scroll because there's no more file to display.  Once below that point, it will keep the cursor in the middle row.

There is a note on :help :echom about redraws.  If you put a redraw before the echom, the message does not disappear.  This is because echom writes the output but it is immediately cleared by the screen redraw when the normal commands cause the screen to scroll.

On Tue, Apr 10, 2018 at 9:23 AM, ds <dsjkvf@gmail.com> wrote:
Hi!

I noticed quite a strange situation when centering text somehow suppresses the echo output.

Since it all sounds rather weird, I created a reproducible example here: https://pastebin.com/F08V77Av – you can download the file, open it with vim -u NONE, source it then, go to line number 13, and start pressing the j key, – and as soon as you'll reach the middle of your screen, and the text will actually start scrolling, the echom output will be suppressed.

Why is that? And is there any workaround?

Thanks!

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment