]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.282 v7.3.282
authorBram Moolenaar <Bram@vim.org>
Wed, 17 Aug 2011 14:25:48 +0000 (16:25 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 17 Aug 2011 14:25:48 +0000 (16:25 +0200)
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)

src/ex_getln.c
src/version.c

index ed0082c1321d65d308cf0a890b6084a905194844..8239c0c87772e9d405b4e216ca2dd78c31cb4197 100644 (file)
@@ -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;
 }
index 35a5479d6ae2d4dd8e05589474b789678986439a..f9760e9a881f1278f01c2cf8feafb4168397a91c 100644 (file)
@@ -709,6 +709,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    282,
 /**/
     281,
 /**/