diff options
author | Bram Moolenaar <Bram@vim.org> | 2008-01-01 13:17:56 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2008-01-01 13:17:56 +0000 |
commit | ee3f7a51c8a2eadde419971cb5a9e01336752a52 (patch) | |
tree | fdb57286c8c7602a32f0b08c60c11cc3162c0031 /src/ex_cmds2.c | |
parent | 4f246a9a2aa45b68644a3adb7cabe2eac18f483e (diff) | |
download | vim-git-ee3f7a51c8a2eadde419971cb5a9e01336752a52.tar.gz |
updated for version 7.1-177v7.1.177
Diffstat (limited to 'src/ex_cmds2.c')
-rw-r--r-- | src/ex_cmds2.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c index add7adb3a..884220ef3 100644 --- a/src/ex_cmds2.c +++ b/src/ex_cmds2.c @@ -93,6 +93,8 @@ do_debug(cmd) int save_emsg_silent = emsg_silent; int save_redir_off = redir_off; tasave_T typeaheadbuf; + int typeahead_saved = FALSE; + int save_ignore_script; # ifdef FEAT_EX_EXTRA int save_ex_normal_busy; # endif @@ -159,18 +161,26 @@ do_debug(cmd) * This makes sure we get input from the user here and don't interfere * with the commands being executed. Reset "ex_normal_busy" to avoid * the side effects of using ":normal". Save the stuff buffer and make - * it empty. */ + * it empty. Set ignore_script to avoid reading from script input. */ # ifdef FEAT_EX_EXTRA save_ex_normal_busy = ex_normal_busy; ex_normal_busy = 0; # endif if (!debug_greedy) + { save_typeahead(&typeaheadbuf); + typeahead_saved = TRUE; + save_ignore_script = ignore_script; + ignore_script = TRUE; + } cmdline = getcmdline_prompt('>', NULL, 0, EXPAND_NOTHING, NULL); - if (!debug_greedy) + if (typeahead_saved) + { restore_typeahead(&typeaheadbuf); + ignore_script = save_ignore_script; + } # ifdef FEAT_EX_EXTRA ex_normal_busy = save_ex_normal_busy; # endif |