comparison src/term.c @ 11784:80fa4b0eb0b0 v8.0.0774

patch 8.0.0774: build failure without the multi-byte feature commit https://github.com/vim/vim/commit/8f14bb58cb7db31797bc1e5ab5c8080dcbb55b98 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jul 25 22:06:43 2017 +0200 patch 8.0.0774: build failure without the multi-byte feature Problem: Build failure without the multi-byte feature on HPUX. Solution: Move #ifdefs. (John Marriott)
author Christian Brabandt <cb@256bit.org>
date Tue, 25 Jul 2017 22:15:04 +0200
parents 5a5709918a98
children ca4931a20f8c
comparison
equal deleted inserted replaced
11783:3a49849036d5 11784:80fa4b0eb0b0
4305 if ((*T_CRV != NUL || *T_U7 != NUL || waiting_for_winpos) 4305 if ((*T_CRV != NUL || *T_U7 != NUL || waiting_for_winpos)
4306 && ((tp[0] == ESC && len >= 3 && tp[1] == '[') 4306 && ((tp[0] == ESC && len >= 3 && tp[1] == '[')
4307 || (tp[0] == CSI && len >= 2)) 4307 || (tp[0] == CSI && len >= 2))
4308 && (VIM_ISDIGIT(*argp) || *argp == '>' || *argp == '?')) 4308 && (VIM_ISDIGIT(*argp) || *argp == '>' || *argp == '?'))
4309 { 4309 {
4310 int col = 0;
4311 int semicols = 0;
4310 #ifdef FEAT_MBYTE 4312 #ifdef FEAT_MBYTE
4311 int col;
4312 int row_char = NUL; 4313 int row_char = NUL;
4313 #endif 4314 #endif
4314 j = 0; 4315
4315 extra = 0; 4316 extra = 0;
4316 for (i = 2 + (tp[0] != CSI); i < len 4317 for (i = 2 + (tp[0] != CSI); i < len
4317 && !(tp[i] >= '{' && tp[i] <= '~') 4318 && !(tp[i] >= '{' && tp[i] <= '~')
4318 && !ASCII_ISALPHA(tp[i]); ++i) 4319 && !ASCII_ISALPHA(tp[i]); ++i)
4319 if (tp[i] == ';' && ++j == 1) 4320 if (tp[i] == ';' && ++semicols == 1)
4320 { 4321 {
4321 extra = i + 1; 4322 extra = i + 1;
4322 #ifdef FEAT_MBYTE 4323 #ifdef FEAT_MBYTE
4323 row_char = tp[i - 1]; 4324 row_char = tp[i - 1];
4324 #endif 4325 #endif
4326 if (i == len) 4327 if (i == len)
4327 { 4328 {
4328 LOG_TR("Not enough characters for CRV"); 4329 LOG_TR("Not enough characters for CRV");
4329 return -1; 4330 return -1;
4330 } 4331 }
4331 #ifdef FEAT_MBYTE
4332 if (extra > 0) 4332 if (extra > 0)
4333 col = atoi((char *)tp + extra); 4333 col = atoi((char *)tp + extra);
4334 else 4334
4335 col = 0; 4335 #ifdef FEAT_MBYTE
4336
4337 /* Eat it when it has 2 arguments and ends in 'R'. Also when 4336 /* Eat it when it has 2 arguments and ends in 'R'. Also when
4338 * u7_status is not "sent", it may be from a previous Vim that 4337 * u7_status is not "sent", it may be from a previous Vim that
4339 * just exited. But not for <S-F3>, it sends something 4338 * just exited. But not for <S-F3>, it sends something
4340 * similar, check for row and column to make sense. */ 4339 * similar, check for row and column to make sense. */
4341 if (j == 1 && tp[i] == 'R') 4340 if (semicols == 1 && tp[i] == 'R')
4342 { 4341 {
4343 if (row_char == '2' && col >= 2) 4342 if (row_char == '2' && col >= 2)
4344 { 4343 {
4345 char *aw = NULL; 4344 char *aw = NULL;
4346 4345
4399 * Ignore it for when the user has set 'term' to xterm, 4398 * Ignore it for when the user has set 'term' to xterm,
4400 * even though it's an rxvt. */ 4399 * even though it's an rxvt. */
4401 if (col > 20000) 4400 if (col > 20000)
4402 col = 0; 4401 col = 0;
4403 4402
4404 if (tp[1 + (tp[0] != CSI)] == '>' && j == 2) 4403 if (tp[1 + (tp[0] != CSI)] == '>' && semicols == 2)
4405 { 4404 {
4406 /* Only set 'ttymouse' automatically if it was not set 4405 /* Only set 'ttymouse' automatically if it was not set
4407 * by the user already. */ 4406 * by the user already. */
4408 if (!option_was_set((char_u *)"ttym")) 4407 if (!option_was_set((char_u *)"ttym"))
4409 { 4408 {