@@ -4307,16 +4307,17 @@ check_termcode(
43074307 || (tp [0 ] == CSI && len >= 2 ))
43084308 && (VIM_ISDIGIT (* argp ) || * argp == '>' || * argp == '?' ))
43094309 {
4310+ int col = 0 ;
4311+ int semicols = 0 ;
43104312#ifdef FEAT_MBYTE
4311- int col ;
43124313 int row_char = NUL ;
43134314#endif
4314- j = 0 ;
4315+
43154316 extra = 0 ;
43164317 for (i = 2 + (tp [0 ] != CSI ); i < len
43174318 && !(tp [i ] >= '{' && tp [i ] <= '~' )
43184319 && !ASCII_ISALPHA (tp [i ]); ++ i )
4319- if (tp [i ] == ';' && ++ j == 1 )
4320+ if (tp [i ] == ';' && ++ semicols == 1 )
43204321 {
43214322 extra = i + 1 ;
43224323#ifdef FEAT_MBYTE
@@ -4328,17 +4329,15 @@ check_termcode(
43284329 LOG_TR ("Not enough characters for CRV" );
43294330 return -1 ;
43304331 }
4331- #ifdef FEAT_MBYTE
43324332 if (extra > 0 )
43334333 col = atoi ((char * )tp + extra );
4334- else
4335- col = 0 ;
43364334
4335+ #ifdef FEAT_MBYTE
43374336 /* Eat it when it has 2 arguments and ends in 'R'. Also when
43384337 * u7_status is not "sent", it may be from a previous Vim that
43394338 * just exited. But not for <S-F3>, it sends something
43404339 * similar, check for row and column to make sense. */
4341- if (j == 1 && tp [i ] == 'R' )
4340+ if (semicols == 1 && tp [i ] == 'R' )
43424341 {
43434342 if (row_char == '2' && col >= 2 )
43444343 {
@@ -4401,7 +4400,7 @@ check_termcode(
44014400 if (col > 20000 )
44024401 col = 0 ;
44034402
4404- if (tp [1 + (tp [0 ] != CSI )] == '>' && j == 2 )
4403+ if (tp [1 + (tp [0 ] != CSI )] == '>' && semicols == 2 )
44054404 {
44064405 /* Only set 'ttymouse' automatically if it was not set
44074406 * by the user already. */
0 commit comments