comparison src/message.c @ 8627:7c98c5d0298c v7.4.1603

commit https://github.com/vim/vim/commit/bfb96c047b79b2aab5fd57a2472871508819f3ef Author: Bram Moolenaar <Bram@vim.org> Date: Sat Mar 19 17:05:20 2016 +0100 patch 7.4.1603 Problem: Timer with an ":echo" command messes up display. Solution: Redraw depending on the mode. (Hirohito Higashi) Avoid the more prompt being used recursively.
author Christian Brabandt <cb@256bit.org>
date Sat, 19 Mar 2016 17:15:04 +0100
parents 6ae3fb4fe7c1
children a410390e340b
comparison
equal deleted inserted replaced
8626:418a2a5ac8af 8627:7c98c5d0298c
868 setmouse(); 868 setmouse();
869 #endif 869 #endif
870 #ifdef USE_ON_FLY_SCROLL 870 #ifdef USE_ON_FLY_SCROLL
871 dont_scroll = TRUE; /* disallow scrolling here */ 871 dont_scroll = TRUE; /* disallow scrolling here */
872 #endif 872 #endif
873 cmdline_row = msg_row;
874
873 /* Avoid the sequence that the user types ":" at the hit-return prompt 875 /* Avoid the sequence that the user types ":" at the hit-return prompt
874 * to start an Ex command, but the file-changed dialog gets in the 876 * to start an Ex command, but the file-changed dialog gets in the
875 * way. */ 877 * way. */
876 if (need_check_timestamps) 878 if (need_check_timestamps)
877 check_timestamps(FALSE); 879 check_timestamps(FALSE);
2424 * Returns TRUE when jumping ahead to "confirm_msg_tail". 2426 * Returns TRUE when jumping ahead to "confirm_msg_tail".
2425 */ 2427 */
2426 static int 2428 static int
2427 do_more_prompt(int typed_char) 2429 do_more_prompt(int typed_char)
2428 { 2430 {
2431 static int entered = FALSE;
2429 int used_typed_char = typed_char; 2432 int used_typed_char = typed_char;
2430 int oldState = State; 2433 int oldState = State;
2431 int c; 2434 int c;
2432 #ifdef FEAT_CON_DIALOG 2435 #ifdef FEAT_CON_DIALOG
2433 int retval = FALSE; 2436 int retval = FALSE;
2434 #endif 2437 #endif
2435 int toscroll; 2438 int toscroll;
2436 msgchunk_T *mp_last = NULL; 2439 msgchunk_T *mp_last = NULL;
2437 msgchunk_T *mp; 2440 msgchunk_T *mp;
2438 int i; 2441 int i;
2442
2443 /* We get called recursively when a timer callback outputs a message. In
2444 * that case don't show another prompt. Also when at the hit-Enter prompt.
2445 */
2446 if (entered || State == HITRETURN)
2447 return FALSE;
2448 entered = TRUE;
2439 2449
2440 if (typed_char == 'G') 2450 if (typed_char == 'G')
2441 { 2451 {
2442 /* "g<": Find first line on the last page. */ 2452 /* "g<": Find first line on the last page. */
2443 mp_last = msg_sb_start(last_msgchunk); 2453 mp_last = msg_sb_start(last_msgchunk);
2673 #ifdef FEAT_RIGHTLEFT 2683 #ifdef FEAT_RIGHTLEFT
2674 else if (cmdmsg_rl) 2684 else if (cmdmsg_rl)
2675 msg_col = Columns - 1; 2685 msg_col = Columns - 1;
2676 #endif 2686 #endif
2677 2687
2688 entered = FALSE;
2678 #ifdef FEAT_CON_DIALOG 2689 #ifdef FEAT_CON_DIALOG
2679 return retval; 2690 return retval;
2680 #else 2691 #else
2681 return FALSE; 2692 return FALSE;
2682 #endif 2693 #endif