summaryrefslogtreecommitdiff
path: root/src/ex_getln.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-01-12 23:22:24 +0000
committerBram Moolenaar <Bram@vim.org>2006-01-12 23:22:24 +0000
commit4770d09abd866bb53d95895dc6a5c5fe7cccb619 (patch)
treeb9ca6f4a66c7591a84cfe88fb21edb31db906a4e /src/ex_getln.c
parent1cbe5f739d4e75b5e16b85ae79ff0434a641b03d (diff)
downloadvim-git-4770d09abd866bb53d95895dc6a5c5fe7cccb619.tar.gz
updated for version 7.0179v7.0179
Diffstat (limited to 'src/ex_getln.c')
-rw-r--r--src/ex_getln.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/ex_getln.c b/src/ex_getln.c
index 335f2a411..95109534a 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -645,8 +645,8 @@ getcmdline(firstc, count, indent)
/*
* Replace the command line with the result of an expression.
- * Need to save the current command line, to be able to enter
- * a new one...
+ * Need to save and restore the current command line, to be
+ * able to enter a new one...
*/
if (ccline.cmdpos == ccline.cmdlen)
new_cmdpos = 99999; /* keep it at the end */
@@ -658,8 +658,17 @@ getcmdline(firstc, count, indent)
restore_cmdline(&save_ccline);
if (c == '=')
{
+ /* Need to save and restore ccline. And go into the
+ * sandbox to avoid nasty things like going to another
+ * buffer when evaluating an expression. */
save_cmdline(&save_ccline);
+#ifdef HAVE_SANDBOX
+ ++sandbox;
+#endif
p = get_expr_line();
+#ifdef HAVE_SANDBOX
+ --sandbox;
+#endif
restore_cmdline(&save_ccline);
if (p != NULL && realloc_cmdbuff((int)STRLEN(p) + 1) == OK)
@@ -1192,6 +1201,18 @@ getcmdline(firstc, count, indent)
case K_IGNORE:
goto cmdline_not_changed; /* Ignore mouse */
+#ifdef FEAT_GUI_W32
+ /* On Win32 ignore <M-F4>, we get it when closing the window was
+ * cancelled. */
+ case K_F4:
+ if (mod_mask == MOD_MASK_ALT)
+ {
+ redrawcmd(); /* somehow the cmdline is cleared */
+ goto cmdline_not_changed;
+ }
+ break;
+#endif
+
#ifdef FEAT_MOUSE
case K_MIDDLEDRAG:
case K_MIDDLERELEASE: