summaryrefslogtreecommitdiff
path: root/src/ex_getln.c
diff options
context:
space:
mode:
authorvimboss <devnull@localhost>2006-01-12 23:22:24 +0000
committervimboss <devnull@localhost>2006-01-12 23:22:24 +0000
commit60ec119feddb9d9ad0e15134d2cbddab9136ac50 (patch)
treeb9ca6f4a66c7591a84cfe88fb21edb31db906a4e /src/ex_getln.c
parenta77a364599cece4c0f9826e37ff89eaf7a3cd757 (diff)
downloadvim-60ec119feddb9d9ad0e15134d2cbddab9136ac50.tar.gz
updated for version 7.0179v7.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 335f2a41..95109534 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: