digraph: refactor code that checks has_mbyte

has_mbyte is always true in nvim.
This commit is contained in:
Jan Edmund Lazo
2018-09-08 23:32:33 -04:00
parent 95608136d5
commit 03bcfb54db

View File

@@ -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++;