To: vim-dev@vim.org Subject: Patch 6.1.168 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.168 Problem: Pressing CTRL-C at the hit-enter prompt doesn't end the prompt. Solution: Make CTRL-C stop the hit-enter prompt. Files: src/message.c *** ../vim61.167/src/message.c Sun May 5 22:51:14 2002 --- src/message.c Wed Aug 28 22:15:55 2002 *************** *** 705,715 **** */ void wait_return(redraw) ! int redraw; { ! int c; ! int oldState; ! int tmpState; if (redraw == TRUE) must_redraw = CLEAR; --- 705,718 ---- */ void wait_return(redraw) ! int redraw; { ! int c; ! int oldState; ! int tmpState; ! #ifndef ORG_HITRETURN ! int had_got_int; ! #endif if (redraw == TRUE) must_redraw = CLEAR; *************** *** 769,774 **** --- 772,780 ---- #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; c = safe_vgetc(); if (!global_busy) got_int = FALSE; *************** *** 782,788 **** c = K_IGNORE; } #endif ! } while (c == Ctrl_C || c == K_IGNORE #ifdef FEAT_GUI || c == K_VER_SCROLLBAR || c == K_HOR_SCROLLBAR #endif --- 788,795 ---- c = K_IGNORE; } #endif ! } while ((had_got_int && c == Ctrl_C) ! || c == K_IGNORE #ifdef FEAT_GUI || c == K_VER_SCROLLBAR || c == K_HOR_SCROLLBAR #endif *************** *** 807,813 **** (void)jump_to_mouse(MOUSE_SETPOS, NULL, 0); else #endif ! if (vim_strchr((char_u *)"\r\n ", c) == NULL) { stuffcharReadbuff(c); do_redraw = TRUE; /* need a redraw even though there is --- 814,820 ---- (void)jump_to_mouse(MOUSE_SETPOS, NULL, 0); else #endif ! if (vim_strchr((char_u *)"\r\n ", c) == NULL && c != Ctrl_C) { stuffcharReadbuff(c); do_redraw = TRUE; /* need a redraw even though there is *** ../vim61.167/src/version.c Fri Aug 30 22:15:48 2002 --- src/version.c Fri Aug 30 22:23:39 2002 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 168, /**/ -- GUARD #1: What -- a swallow carrying a coconut? ARTHUR: It could grip it by the husk! GUARD #1: It's not a question of where he grips it! It's a simple question of weight ratios! A five ounce bird could not carry a 1 pound coconut. The Quest for the Holy Grail (Monty Python) /// Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net \\\ /// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim \\\ \\\ Project leader for A-A-P -- http://www.a-a-p.org /// \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///