Bram Moolenaar wrote:

> Dominique Pelle wrote:
...snip...
>> I'm not sure whether this current behavior for <PageDown> is
>> intentional or whether it is a bug.  It looks like a bug and I
>> think it should behave like pressing 'f'.  In any case, it not
>> documented in ":help more-prompt".
>
> On the other hand, if there are only a couple of lines of output, then
> it's perhaps more logical that the <PageDown> is taken as the next
> command, thus scrolls down the text of the window.
...snip...


OK, I guess I just trained myself to use the wrong keys: <PageDown>
and <PageUp> instead of 'f' and 'b' to browse through long command
output page by page. It's time for me to change my old habits and
start using 'f' and 'b' for this.

But ":help message.txt" doesn't describe anywhere the subtle
difference between <PageDown> and 'f'.  That explains why I got
into the bad habit of using <PageDown> and was confused.
I suspect I must not be the only one, since pressing <PageDown>
is probably more natural than pressing 'f'.

I currently see in ":help messages":

=============================================
-> Pressing 'j', 'd' or <Down> is ignored when messages scrolled off the top
   of the screen, 'compatible' is off and 'more' is on, to avoid that typing
   one 'j' too many causes the messages to disappear.
=============================================

It should also say that pressing 'f' is also ignored in such case.

See the source code in message.c:

978          else if (msg_scrolled > Rows - 2
979                   && (c == 'j' || c == K_DOWN || c == 'd' || c == 'f'))
980              c = K_IGNORE;

How about attached patch to fix documentation?

Regards
-- Dominique

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

*** ../vim-runtime/doc/message.txt	2009-02-22 22:51:56.000000000 +0100
--- doc/message.txt	2009-04-19 18:36:53.000000000 +0200
***************
*** 758,766 ****
  -> Press 'k', <Up>, 'u', 'b' or 'g' to scroll back in the messages.  This
     works the same way as at the |more-prompt|.  Only works when 'compatible'
     is off and 'more' is on.
! -> Pressing 'j', 'd' or <Down> is ignored when messages scrolled off the top
!    of the screen, 'compatible' is off and 'more' is on, to avoid that typing
!    one 'j' too many causes the messages to disappear.
  -> Press <C-Y> to copy (yank) a modeless selection to the clipboard register.
  -> Use a menu.  The characters defined for Cmdline-mode are used.
  -> When 'mouse' contains the 'r' flag, clicking the left mouse button works
--- 758,766 ----
  -> Press 'k', <Up>, 'u', 'b' or 'g' to scroll back in the messages.  This
     works the same way as at the |more-prompt|.  Only works when 'compatible'
     is off and 'more' is on.
! -> Pressing 'j', 'f', 'd' or <Down> is ignored when messages scrolled off the
!    top of the screen, 'compatible' is off and 'more' is on, to avoid that
!    typing one 'j' too many causes the messages to disappear.
  -> Press <C-Y> to copy (yank) a modeless selection to the clipboard register.
  -> Use a menu.  The characters defined for Cmdline-mode are used.
  -> When 'mouse' contains the 'r' flag, clicking the left mouse button works

Raspunde prin e-mail lui