From f95dc3b8234c05116f71aee5a72ddd8d9afd4718 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 22 May 2005 22:02:25 +0000 Subject: updated for version 7.0075 --- src/message.c | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) (limited to 'src/message.c') diff --git a/src/message.c b/src/message.c index 7f9a22c2d3..85ff3e629b 100644 --- a/src/message.c +++ b/src/message.c @@ -844,9 +844,7 @@ wait_return(redraw) int c; int oldState; int tmpState; -#ifndef ORG_HITRETURN int had_got_int; -#endif if (redraw == TRUE) must_redraw = CLEAR; @@ -900,22 +898,22 @@ wait_return(redraw) #endif hit_return_msg(); -#ifdef ORG_HITRETURN - do - { - c = safe_vgetc(); - } while (vim_strchr((char_u *)"\r\n: ", c) == NULL); - if (c == ':') /* this can vi too (but not always!) */ - stuffcharReadbuff(c); -#else do { /* Remember "got_int", if it is set vgetc() probably returns a * CTRL-C, but we need to loop then. */ had_got_int = got_int; + + /* Don't do mappings here, we put the character back in the + * typeahead buffer. */ + ++no_mapping; + ++allow_keys; c = safe_vgetc(); if (had_got_int && !global_busy) got_int = FALSE; + --no_mapping; + --allow_keys; + #ifdef FEAT_CLIPBOARD /* Strange way to allow copying (yanking) a modeless selection at * the hit-enter prompt. Use CTRL-Y, because the same is used in @@ -957,11 +955,16 @@ wait_return(redraw) #endif if (vim_strchr((char_u *)"\r\n ", c) == NULL && c != Ctrl_C) { - stuffcharReadbuff(c); + char_u buf[2]; + + /* Put the character back in the typeahead buffer. Don't use the + * stuff buffer, because lmaps wouldn't work. */ + buf[0] = c; + buf[1] = NUL; + ins_typebuf(buf, REMAP_YES, 0, !KeyTyped, FALSE); do_redraw = TRUE; /* need a redraw even though there is - something in the stuff buffer */ + typeahead */ } -#endif } redir_off = FALSE; @@ -1033,11 +1036,7 @@ hit_return_msg() if (got_int) MSG_PUTS(_("Interrupt: ")); -#ifdef ORG_HITRETURN - MSG_PUTS_ATTR(_("Hit ENTER to continue"), hl_attr(HLF_R)); -#else MSG_PUTS_ATTR(_("Hit ENTER or type command to continue"), hl_attr(HLF_R)); -#endif if (!msg_use_printf()) msg_clr_eos(); } -- cgit v1.2.3