diff src/terminal.c @ 13829:044337cbf854 v8.0.1786

patch 8.0.1786: no test for 'termwinkey' commit https://github.com/vim/vim/commit/b2ac14c0b5e23f8ab97c5c784bcd83e13ba8ded3 Author: Bram Moolenaar <Bram@vim.org> Date: Tue May 1 18:47:59 2018 +0200 patch 8.0.1786: no test for 'termwinkey' Problem: No test for 'termwinkey'. Solution: Add a test. Make feedkeys() handle terminal_loop() returning before characters are consumed.
author Christian Brabandt <cb@256bit.org>
date Tue, 01 May 2018 19:00:07 +0200
parents d0d8125ba692
children 8e583c52eb44
line wrap: on
line diff
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -42,7 +42,6 @@
  *   redirection.  Probably in call to channel_set_pipes().
  * - Win32: Redirecting output does not work, Test_terminal_redir_file()
  *   is disabled.
- * - Add test for 'termwinkey'.
  * - When starting terminal window with shell in terminal, then using :gui to
  *   switch to GUI, shell stops working. Scrollback seems wrong, command
  *   running in shell is still running.
@@ -1690,6 +1689,7 @@ send_keys_to_term(term_T *term, int c, i
 	    return FAIL;
 
 	case K_IGNORE:
+	case K_CANCEL:  // used for :normal when running out of chars
 	    return FAIL;
 
 	case K_LEFTDRAG:
@@ -1826,9 +1826,9 @@ term_paste_register(int prev_c UNUSED)
     }
 }
 
-#if defined(FEAT_GUI) || defined(PROTO)
 /*
- * Return TRUE when the cursor of the terminal should be displayed.
+ * Return TRUE when waiting for a character in the terminal, the cursor of the
+ * terminal should be displayed.
  */
     int
 terminal_is_active()
@@ -1836,6 +1836,7 @@ terminal_is_active()
     return in_terminal_loop != NULL;
 }
 
+#if defined(FEAT_GUI) || defined(PROTO)
     cursorentry_T *
 term_get_cursor_shape(guicolor_T *fg, guicolor_T *bg)
 {