comparison src/term.c @ 13008:e775011b4c1e v8.0.1380

patch 8.0.1380: using "vim -r swapfile" the hit-enter prompt is misplaced. commit https://github.com/vim/vim/commit/05684310a53c8a4804441c1c6f8b7fc9e8194940 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Dec 9 15:11:24 2017 +0100 patch 8.0.1380: using "vim -r swapfile" the hit-enter prompt is misplaced. Problem: When recovering a file with "vim -r swapfile" the hit-enter prompt is at the top of the window. Solution: Invalidate the cursor position.
author Christian Brabandt <cb@256bit.org>
date Sat, 09 Dec 2017 15:15:05 +0100
parents d872005ecfcd
children 808625d4b71b
comparison
equal deleted inserted replaced
13007:84c4f8a80bb6 13008:e775011b4c1e
3508 * after this. Clear them out for now. */ 3508 * after this. Clear them out for now. */
3509 term_windgoto(1, 0); 3509 term_windgoto(1, 0);
3510 out_str((char_u *)" "); 3510 out_str((char_u *)" ");
3511 term_windgoto(0, 0); 3511 term_windgoto(0, 0);
3512 3512
3513 /* Need to reset the known cursor position. */
3514 screen_start();
3515
3513 /* check for the characters now, otherwise they might be eaten by 3516 /* check for the characters now, otherwise they might be eaten by
3514 * get_keystroke() */ 3517 * get_keystroke() */
3515 out_flush(); 3518 out_flush();
3516 (void)vpeekc_nomap(); 3519 (void)vpeekc_nomap();
3517 } 3520 }
4583 { 4586 {
4584 is_not_xterm = TRUE; 4587 is_not_xterm = TRUE;
4585 is_mac_terminal = TRUE; 4588 is_mac_terminal = TRUE;
4586 } 4589 }
4587 # ifdef FEAT_MOUSE_SGR 4590 # ifdef FEAT_MOUSE_SGR
4588 /* Iterm2 sends 0;95;0 */ 4591 /* iTerm2 sends 0;95;0 */
4589 if (STRNCMP(tp + extra - 2, "0;95;0c", 7) == 0) 4592 if (STRNCMP(tp + extra - 2, "0;95;0c", 7) == 0)
4590 is_iterm2 = TRUE; 4593 is_iterm2 = TRUE;
4591 # endif 4594 # endif
4592 } 4595 }
4593 4596
4595 * by the user already. */ 4598 * by the user already. */
4596 if (!option_was_set((char_u *)"ttym")) 4599 if (!option_was_set((char_u *)"ttym"))
4597 { 4600 {
4598 # ifdef FEAT_MOUSE_SGR 4601 # ifdef FEAT_MOUSE_SGR
4599 /* Xterm version 277 supports SGR. Also support 4602 /* Xterm version 277 supports SGR. Also support
4600 * Terminal.app and iterm2. */ 4603 * Terminal.app and iTerm2. */
4601 if (version >= 277 || is_iterm2 || is_mac_terminal) 4604 if (version >= 277 || is_iterm2 || is_mac_terminal)
4602 set_option_value((char_u *)"ttym", 0L, 4605 set_option_value((char_u *)"ttym", 0L,
4603 (char_u *)"sgr", 0); 4606 (char_u *)"sgr", 0);
4604 else 4607 else
4605 # endif 4608 # endif