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/proto/main.pro b/src/proto/main.pro
index f0f9b73..307b606 100644
--- a/src/proto/main.pro
+++ b/src/proto/main.pro
@@ -9,6 +9,7 @@
void state_no_longer_safe(char *reason);
int get_was_safe_state(void);
void may_trigger_safestateagain(void);
+int work_pending(void);
void main_loop(int cmdwin, int noexmode);
void getout_preserve_modified(int exitval);
void getout(int exitval);
diff --git a/src/proto/term.pro b/src/proto/term.pro
index b1c691d..93edba1 100644
--- a/src/proto/term.pro
+++ b/src/proto/term.pro
@@ -48,6 +48,8 @@
void shell_resized_check(void);
void set_shellsize(int width, int height, int mustset);
void out_str_t_TE(void);
+void out_str_t_TI(void);
+void may_send_t_RK(void);
void settmode(tmode_T tmode);
void starttermcap(void);
void stoptermcap(void);