patch 9.1.0029: Cannot act on various terminal response codes
Problem: Cannot act on various terminal response codes
Solution: Add the TerminalResponseAll autocommand
(Danek Duvall)
closes: #13829
Signed-off-by: Danek Duvall <duvall@comfychair.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/term.c b/src/term.c
index dd59fdf..734b759 100644
--- a/src/term.c
+++ b/src/term.c
@@ -4986,6 +4986,8 @@
#ifdef FEAT_EVAL
set_vim_var_string(VV_TERMU7RESP, tp, csi_len);
#endif
+ apply_autocmds(EVENT_TERMRESPONSEALL,
+ (char_u *)"ambiguouswidth", NULL, FALSE, curbuf);
}
}
else if (arg[0] == 3)
@@ -5595,6 +5597,8 @@
#endif
apply_autocmds(EVENT_TERMRESPONSE,
NULL, NULL, FALSE, curbuf);
+ apply_autocmds(EVENT_TERMRESPONSEALL,
+ (char_u *)"version", NULL, FALSE, curbuf);
key_name[0] = (int)KS_EXTRA;
key_name[1] = (int)KE_IGNORE;
}
@@ -5621,6 +5625,8 @@
# ifdef FEAT_EVAL
set_vim_var_string(VV_TERMBLINKRESP, tp, *slen);
# endif
+ apply_autocmds(EVENT_TERMRESPONSEALL,
+ (char_u *)"cursorblink", NULL, FALSE, curbuf);
}
#endif
@@ -5784,6 +5790,8 @@
set_vim_var_string(is_bg ? VV_TERMRBGRESP
: VV_TERMRFGRESP, tp, *slen);
#endif
+ apply_autocmds(EVENT_TERMRESPONSEALL,
+ is_bg ? (char_u *)"background" : (char_u *)"foreground", NULL, FALSE, curbuf);
break;
}
if (i == len)
@@ -5882,6 +5890,8 @@
#ifdef FEAT_EVAL
set_vim_var_string(VV_TERMSTYLERESP, tp, *slen);
#endif
+ apply_autocmds(EVENT_TERMRESPONSEALL,
+ (char_u *)"cursorshape", NULL, FALSE, curbuf);
break;
}
}