mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
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.
This commit is contained in:
parent
a0844a1170
commit
9c8c8c5d30
33
src/term.c
33
src/term.c
@ -3379,7 +3379,8 @@ may_req_ambiguous_char_width()
|
|||||||
out_str(buf);
|
out_str(buf);
|
||||||
out_str(T_U7);
|
out_str(T_U7);
|
||||||
u7_status = U7_SENT;
|
u7_status = U7_SENT;
|
||||||
term_windgoto(0, 0);
|
out_flush();
|
||||||
|
term_windgoto(1, 0);
|
||||||
out_str((char_u *)" ");
|
out_str((char_u *)" ");
|
||||||
term_windgoto(0, 0);
|
term_windgoto(0, 0);
|
||||||
/* check for the characters now, otherwise they might be eaten by
|
/* check for the characters now, otherwise they might be eaten by
|
||||||
@ -4185,24 +4186,38 @@ check_termcode(max_offset, buf, bufsize, buflen)
|
|||||||
|| (tp[0] == CSI && len >= 2))
|
|| (tp[0] == CSI && len >= 2))
|
||||||
&& (VIM_ISDIGIT(*p) || *p == '>' || *p == '?'))
|
&& (VIM_ISDIGIT(*p) || *p == '>' || *p == '?'))
|
||||||
{
|
{
|
||||||
|
#ifdef FEAT_MBYTE
|
||||||
|
int col;
|
||||||
|
int row_char;
|
||||||
|
#endif
|
||||||
j = 0;
|
j = 0;
|
||||||
extra = 0;
|
extra = 0;
|
||||||
for (i = 2 + (tp[0] != CSI); i < len
|
for (i = 2 + (tp[0] != CSI); i < len
|
||||||
&& !(tp[i] >= '{' && tp[i] <= '~')
|
&& !(tp[i] >= '{' && tp[i] <= '~')
|
||||||
&& !ASCII_ISALPHA(tp[i]); ++i)
|
&& !ASCII_ISALPHA(tp[i]); ++i)
|
||||||
if (tp[i] == ';' && ++j == 1)
|
if (tp[i] == ';' && ++j == 1)
|
||||||
|
{
|
||||||
extra = i + 1;
|
extra = i + 1;
|
||||||
|
#ifdef FEAT_MBYTE
|
||||||
|
row_char = tp[i - 1];
|
||||||
|
#endif
|
||||||
|
}
|
||||||
if (i == len)
|
if (i == len)
|
||||||
{
|
{
|
||||||
LOG_TR("Not enough characters for CRV");
|
LOG_TR("Not enough characters for CRV");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef FEAT_MBYTE
|
#ifdef FEAT_MBYTE
|
||||||
/* Eat it when it has 2 arguments and ends in 'R'. Ignore it
|
if (extra > 0)
|
||||||
* when u7_status is not "sent", <S-F3> sends something
|
col = atoi((char *)tp + extra);
|
||||||
* similar. */
|
else
|
||||||
if (j == 1 && tp[i] == 'R' && u7_status == U7_SENT)
|
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;
|
char *aw = NULL;
|
||||||
|
|
||||||
@ -4211,11 +4226,9 @@ check_termcode(max_offset, buf, bufsize, buflen)
|
|||||||
# ifdef FEAT_AUTOCMD
|
# ifdef FEAT_AUTOCMD
|
||||||
did_cursorhold = TRUE;
|
did_cursorhold = TRUE;
|
||||||
# endif
|
# endif
|
||||||
if (extra > 0)
|
if (col == 2)
|
||||||
extra = atoi((char *)tp + extra);
|
|
||||||
if (extra == 2)
|
|
||||||
aw = "single";
|
aw = "single";
|
||||||
else if (extra == 3)
|
else if (col == 3)
|
||||||
aw = "double";
|
aw = "double";
|
||||||
if (aw != NULL && STRCMP(aw, p_ambw) != 0)
|
if (aw != NULL && STRCMP(aw, p_ambw) != 0)
|
||||||
{
|
{
|
||||||
|
@ -738,6 +738,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
207,
|
||||||
/**/
|
/**/
|
||||||
206,
|
206,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user