summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <bram@vim.org>2011-08-17 16:25:48 +0200
committerBram Moolenaar <bram@vim.org>2011-08-17 16:25:48 +0200
commitbad2a8f981e233811f9bc0fd74b2b076504357dc (patch)
tree6fb9b5d04a888062fb8f17240bf56416386256c8
parent7f10f088b6a451c417e8fc0e25b0b3180c29b9d2 (diff)
downloadvim-bad2a8f981e233811f9bc0fd74b2b076504357dc.tar.gz
updated for version 7.3.282v7.3.282v7-3-282
Problem: When using input() and :echo in a loop the displayed text is incorrect. (Benjamin Fritz) Solution: Only restore the cursor position when there is a command line. (Ben Schmidt)
-rw-r--r--src/ex_getln.c8
-rw-r--r--src/version.c2
2 files changed, 8 insertions, 2 deletions
diff --git a/src/ex_getln.c b/src/ex_getln.c
index ed0082c1..8239c0c8 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -1969,8 +1969,12 @@ getcmdline_prompt(firstc, prompt, attr, xp_context, xp_arg)
# endif
s = getcmdline(firstc, 1L, 0);
restore_cmdline(&save_ccline);
- /* Restore msg_col, the prompt from input() may have changed it. */
- msg_col = msg_col_save;
+ /* Restore msg_col, the prompt from input() may have changed it.
+ * But only if called recursively and the commandline is therefore being
+ * restored to an old one; if not, the input() prompt stays on the screen,
+ * so we need its modified msg_col left intact. */
+ if (ccline.cmdbuff != NULL)
+ msg_col = msg_col_save;
return s;
}
diff --git a/src/version.c b/src/version.c
index 35a5479d..f9760e9a 100644
--- 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 */
/**/
+ 282,
+/**/
281,
/**/
280,