mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
refactor(buf_init_chartab): remove redundant loop (#24891)
This commit is contained in:
parent
a6d0535c15
commit
e8dd3fa280
@ -112,19 +112,13 @@ int buf_init_chartab(buf_T *buf, int global)
|
||||
while (c < 256) {
|
||||
if (c >= 0xa0) {
|
||||
// UTF-8: bytes 0xa0 - 0xff are printable (latin1)
|
||||
g_chartab[c++] = CT_PRINT_CHAR + 1;
|
||||
// Also assume that every multi-byte char is a filename character.
|
||||
g_chartab[c++] = (CT_PRINT_CHAR | CT_FNAME_CHAR) + 1;
|
||||
} else {
|
||||
// the rest is unprintable by default
|
||||
g_chartab[c++] = (dy_flags & DY_UHEX) ? 4 : 2;
|
||||
}
|
||||
}
|
||||
|
||||
// Assume that every multi-byte char is a filename character.
|
||||
for (c = 1; c < 256; c++) {
|
||||
if (c >= 0xa0) {
|
||||
g_chartab[c] |= CT_FNAME_CHAR;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Init word char flags all to false
|
||||
|
Loading…
Reference in New Issue
Block a user