summaryrefslogtreecommitdiffstats
path: root/src/getchar.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2008-01-01 13:17:56 +0000
committerBram Moolenaar <Bram@vim.org>2008-01-01 13:17:56 +0000
commitee3f7a51c8a2eadde419971cb5a9e01336752a52 (patch)
treefdb57286c8c7602a32f0b08c60c11cc3162c0031 /src/getchar.c
parent4f246a9a2aa45b68644a3adb7cabe2eac18f483e (diff)
updated for version 7.1-177v7.1.177
Diffstat (limited to 'src/getchar.c')
-rw-r--r--src/getchar.c27
1 files changed, 21 insertions, 6 deletions
diff --git a/src/getchar.c b/src/getchar.c
index 0e78a7bd87..d1c70c9db1 100644
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -1279,8 +1279,14 @@ alloc_typebuf()
void
free_typebuf()
{
- vim_free(typebuf.tb_buf);
- vim_free(typebuf.tb_noremap);
+ if (typebuf.tb_buf == typebuf_init)
+ EMSG2(_(e_intern2), "Free typebuf 1");
+ else
+ vim_free(typebuf.tb_buf);
+ if (typebuf.tb_buf == noremapbuf_init)
+ EMSG2(_(e_intern2), "Free typebuf 2");
+ else
+ vim_free(typebuf.tb_noremap);
}
/*
@@ -1359,6 +1365,11 @@ openscript(name, directly)
EMSG(_(e_nesting));
return;
}
+#ifdef FEAT_EVAL
+ if (ignore_script)
+ /* Not reading from script, also don't open one. Warning message? */
+ return;
+#endif
if (scriptin[curscript] != NULL) /* already reading script */
++curscript;
@@ -2346,7 +2357,7 @@ vgetorpeek(advance)
current_menu->silent[idx]);
}
}
-#endif /* FEAT_GUI */
+#endif /* FEAT_GUI && FEAT_MENU */
continue; /* try mapping again */
}
@@ -2862,11 +2873,15 @@ inchar(buf, maxlen, wait_time, tb_change_cnt)
undo_off = FALSE; /* restart undo now */
/*
- * first try script file
- * If interrupted: Stop reading script files.
+ * Get a character from a script file if there is one.
+ * If interrupted: Stop reading script files, close them all.
*/
script_char = -1;
- while (scriptin[curscript] != NULL && script_char < 0)
+ while (scriptin[curscript] != NULL && script_char < 0
+#ifdef FEAT_EVAL
+ && !ignore_script
+#endif
+ )
{
if (got_int || (script_char = getc(scriptin[curscript])) < 0)
{