patch 9.0.0980: the keyboard state response may end up in a shell command
Problem: The keyboard state response may end up in a shell command.
Solution: Only request the keyboard protocol state when the typeahead is
empty, no more commands are following and not exiting. Add the
t_RK termcap entry for this.
diff --git a/src/ex_getln.c b/src/ex_getln.c
index 72f2a3a..44049c7 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -2908,6 +2908,9 @@
long sw;
char_u *s;
+ // May request the keyboard protocol state now.
+ may_send_t_RK();
+
if (ga_grow(&line_ga, 40) == FAIL)
break;