# HG changeset patch # User Bram Moolenaar # Date 1310049877 -7200 # Node ID 0a650db0265381b540df8ca6bd716c4b2d47dfc9 # Parent 73c9479ccf5748009b53ed013b5c2be1ef6cf11b 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) diff --git a/src/ex_getln.c b/src/ex_getln.c --- 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; } diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -710,6 +710,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 241, +/**/ 240, /**/ 239,