Mercurial > vim
diff src/ex_getln.c @ 2937:0a650db02653 v7.3.241
updated for version 7.3.241
Problem: Using CTRL-R CTRL-W on the command line may insert only part of
the word.
Solution: Use the cursor position instead of assuming it is at the end of
the command. (Tyru)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Thu, 07 Jul 2011 16:44:37 +0200 |
parents | f2c108f44f41 |
children | eff686fb8de6 |
line wrap: on
line diff
--- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -3046,7 +3046,7 @@ cmdline_paste(regname, literally, remcr) int len; /* Locate start of last word in the cmd buffer. */ - for (w = ccline.cmdbuff + ccline.cmdlen; w > ccline.cmdbuff; ) + for (w = ccline.cmdbuff + ccline.cmdpos; w > ccline.cmdbuff; ) { #ifdef FEAT_MBYTE if (has_mbyte) @@ -3064,7 +3064,7 @@ cmdline_paste(regname, literally, remcr) --w; } } - len = (int)((ccline.cmdbuff + ccline.cmdlen) - w); + len = (int)((ccline.cmdbuff + ccline.cmdpos) - w); if (p_ic ? STRNICMP(w, arg, len) == 0 : STRNCMP(w, arg, len) == 0) p += len; }