updated for version 7.4.207
Problem: The cursor report sequence is sometimes not recognized and results
in entering replace mode.
Solution: Also check for the cursor report when not asked for.
diff --git a/src/term.c b/src/term.c
index 763f8e7..699e356 100644
--- a/src/term.c
+++ b/src/term.c
@@ -3379,7 +3379,8 @@
out_str(buf);
out_str(T_U7);
u7_status = U7_SENT;
- term_windgoto(0, 0);
+ out_flush();
+ term_windgoto(1, 0);
out_str((char_u *)" ");
term_windgoto(0, 0);
/* check for the characters now, otherwise they might be eaten by
@@ -4185,24 +4186,38 @@
|| (tp[0] == CSI && len >= 2))
&& (VIM_ISDIGIT(*p) || *p == '>' || *p == '?'))
{
+#ifdef FEAT_MBYTE
+ int col;
+ int row_char;
+#endif
j = 0;
extra = 0;
for (i = 2 + (tp[0] != CSI); i < len
&& !(tp[i] >= '{' && tp[i] <= '~')
&& !ASCII_ISALPHA(tp[i]); ++i)
if (tp[i] == ';' && ++j == 1)
+ {
extra = i + 1;
+#ifdef FEAT_MBYTE
+ row_char = tp[i - 1];
+#endif
+ }
if (i == len)
{
LOG_TR("Not enough characters for CRV");
return -1;
}
-
#ifdef FEAT_MBYTE
- /* Eat it when it has 2 arguments and ends in 'R'. Ignore it
- * when u7_status is not "sent", <S-F3> sends something
- * similar. */
- if (j == 1 && tp[i] == 'R' && u7_status == U7_SENT)
+ if (extra > 0)
+ col = atoi((char *)tp + extra);
+ else
+ col = 0;
+
+ /* Eat it when it has 2 arguments and ends in 'R'. Also when
+ * u7_status is not "sent", it may be from a previous Vim that
+ * just exited. But not for <S-F3>, it sends something
+ * similar, check for row and column to make sense. */
+ if (j == 1 && tp[i] == 'R' && row_char == '2' && col >= 2)
{
char *aw = NULL;
@@ -4211,18 +4226,16 @@
# ifdef FEAT_AUTOCMD
did_cursorhold = TRUE;
# endif
- if (extra > 0)
- extra = atoi((char *)tp + extra);
- if (extra == 2)
+ if (col == 2)
aw = "single";
- else if (extra == 3)
+ else if (col == 3)
aw = "double";
if (aw != NULL && STRCMP(aw, p_ambw) != 0)
{
/* Setting the option causes a screen redraw. Do that
* right away if possible, keeping any messages. */
set_option_value((char_u *)"ambw", 0L, (char_u *)aw, 0);
-#ifdef DEBUG_TERMRESPONSE
+# ifdef DEBUG_TERMRESPONSE
{
char buf[100];
int r = redraw_asap(CLEAR);
@@ -4231,9 +4244,9 @@
r);
log_tr(buf);
}
-#else
+# else
redraw_asap(CLEAR);
-#endif
+# endif
}
key_name[0] = (int)KS_EXTRA;
key_name[1] = (int)KE_IGNORE;
diff --git a/src/version.c b/src/version.c
index aabc366..7ee3b68 100644
--- a/src/version.c
+++ b/src/version.c
@@ -739,6 +739,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 207,
+/**/
206,
/**/
205,