Mercurial > vim
comparison src/getchar.c @ 25852:336e2d9924e6 v8.2.3460
patch 8.2.3460: some type casts are not needed
Commit: https://github.com/vim/vim/commit/dfa5e464d459f84200a73d178f1ecefe75bbe511
Author: =?UTF-8?q?Dundar=20G=C3=B6c?= <gocdundar@gmail.com>
Date: Sat Oct 2 11:26:51 2021 +0100
patch 8.2.3460: some type casts are not needed
Problem: Some type casts are not needed.
Solution: Remove unnecessary type casts. (closes https://github.com/vim/vim/issues/8934)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 02 Oct 2021 12:30:05 +0200 |
parents | 0082503ff2ff |
children | 2ee0425960fe |
comparison
equal
deleted
inserted
replaced
25851:6dd46a7fa3cd | 25852:336e2d9924e6 |
---|---|
1851 // or a CSI - KS_EXTRA - KE_CSI sequence, which | 1851 // or a CSI - KS_EXTRA - KE_CSI sequence, which |
1852 // represents a CSI (0x9B), | 1852 // represents a CSI (0x9B), |
1853 // or a K_SPECIAL - KS_EXTRA - KE_CSI, which is CSI | 1853 // or a K_SPECIAL - KS_EXTRA - KE_CSI, which is CSI |
1854 // too. | 1854 // too. |
1855 c = vgetorpeek(TRUE); | 1855 c = vgetorpeek(TRUE); |
1856 if (vgetorpeek(TRUE) == (int)KE_CSI && c == KS_EXTRA) | 1856 if (vgetorpeek(TRUE) == KE_CSI && c == KS_EXTRA) |
1857 buf[i] = CSI; | 1857 buf[i] = CSI; |
1858 } | 1858 } |
1859 } | 1859 } |
1860 --no_mapping; | 1860 --no_mapping; |
1861 c = (*mb_ptr2char)(buf); | 1861 c = (*mb_ptr2char)(buf); |
2519 // mapping starts with K_SNR. | 2519 // mapping starts with K_SNR. |
2520 s = typebuf.tb_noremap + typebuf.tb_off; | 2520 s = typebuf.tb_noremap + typebuf.tb_off; |
2521 if (*s == RM_SCRIPT | 2521 if (*s == RM_SCRIPT |
2522 && (mp->m_keys[0] != K_SPECIAL | 2522 && (mp->m_keys[0] != K_SPECIAL |
2523 || mp->m_keys[1] != KS_EXTRA | 2523 || mp->m_keys[1] != KS_EXTRA |
2524 || mp->m_keys[2] != (int)KE_SNR)) | 2524 || mp->m_keys[2] != KE_SNR)) |
2525 continue; | 2525 continue; |
2526 | 2526 |
2527 // If one of the typed keys cannot be remapped, skip the | 2527 // If one of the typed keys cannot be remapped, skip the |
2528 // entry. | 2528 // entry. |
2529 for (n = mlen; --n >= 0; ) | 2529 for (n = mlen; --n >= 0; ) |
3137 while (col < curwin->w_cursor.col) | 3137 while (col < curwin->w_cursor.col) |
3138 { | 3138 { |
3139 if (!VIM_ISWHITE(ptr[col])) | 3139 if (!VIM_ISWHITE(ptr[col])) |
3140 curwin->w_wcol = vcol; | 3140 curwin->w_wcol = vcol; |
3141 vcol += lbr_chartabsize(ptr, ptr + col, | 3141 vcol += lbr_chartabsize(ptr, ptr + col, |
3142 (colnr_T)vcol); | 3142 vcol); |
3143 if (has_mbyte) | 3143 if (has_mbyte) |
3144 col += (*mb_ptr2len)(ptr + col); | 3144 col += (*mb_ptr2len)(ptr + col); |
3145 else | 3145 else |
3146 ++col; | 3146 ++col; |
3147 } | 3147 } |