Pritesh Mistry wrote:
> I have seen that many a times, the previous command, beginning with
> a :, is not cleared on leaving the command line with a ^C. Is this
> The problem with this is that, because of this, if I enter a new
> command using a mapping like "nmap <M-x> :", then the first line of
> the cmd-line is not reused for that & you enter the second line for
> this new command.
> I see where the problem could be: if you ^C a command, then only the
> line on which you were is cleared, not the previous ones if the
> number is less than the commandheight. It would be nice if the
> minibuffer is completely cleared off with ^C, unless there is a
> reason to leave it as such.
> For eg:
> 1. I set cmdheight to 2.
> 2. I do ":abcd^D" get :abcd again.
> 3. I ^C to exit the cmd-line.
> 4. Now, this is not consistent, but 'usually' if I press '<M-x>' again,
> it takes me to the second line on the cmdline & not always
> the first.
I can reproduce this always. It happens because the ":" is mapped, in
which case the row for the cmdline isn't reset (don't recall why, it was
this way for a very long time).
This patch should fix it:
*** ../../vim-6.0au/src/ex_getln.c Sun Sep 2 19:29:02 2001
--- ex_getln.c Tue Sep 4 20:08:16 2001
*** 1468,1473 ****
--- 1468,1475 ----
ccline.cmdbuff = NULL;
+ if (msg_scrolled == 0)
redraw_cmdline = TRUE;
No children may attend school with their breath smelling of "wild onions."
[real standing law in West Virginia, United States of America]
/// Bram Moolenaar -- Bram@...
((( Creator of Vim -- http://vim.sf.net
-- ftp://ftp.vim.org/pub/vim )))
\\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org