mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 11:28:22 +00:00
digraph: refactor code that checks has_mbyte
has_mbyte is always true in nvim.
This commit is contained in:
@@ -1549,11 +1549,6 @@ static int getexactdigraph(int char1, int char2, int meta_char)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ignore multi-byte characters when not in multi-byte mode.
|
|
||||||
if (!has_mbyte && (retval > 0xff)) {
|
|
||||||
retval = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (retval == 0) {
|
if (retval == 0) {
|
||||||
// digraph deleted or not found
|
// digraph deleted or not found
|
||||||
if ((char1 == ' ') && meta_char) {
|
if ((char1 == ' ') && meta_char) {
|
||||||
@@ -1660,8 +1655,7 @@ void listdigraphs(void)
|
|||||||
tmp.result = getexactdigraph(tmp.char1, tmp.char2, FALSE);
|
tmp.result = getexactdigraph(tmp.char1, tmp.char2, FALSE);
|
||||||
|
|
||||||
if ((tmp.result != 0)
|
if ((tmp.result != 0)
|
||||||
&& (tmp.result != tmp.char2)
|
&& (tmp.result != tmp.char2)) {
|
||||||
&& (has_mbyte || (tmp.result <= 255))) {
|
|
||||||
printdigraph(&tmp);
|
printdigraph(&tmp);
|
||||||
}
|
}
|
||||||
dp++;
|
dp++;
|
||||||
|
Reference in New Issue
Block a user