mirror of
https://github.com/neovim/neovim.git
synced 2025-09-11 13:58:18 +00:00
mbyte: replace vim_tolower with mb_tolower handling locale correctly
This commit is contained in:
@@ -1956,16 +1956,16 @@ int swapchar(int op_type, pos_T *pos)
|
||||
if (enc_dbcs != 0 && c >= 0x100) /* No lower/uppercase letter */
|
||||
return FALSE;
|
||||
nc = c;
|
||||
if (vim_islower(c)) {
|
||||
if (mb_islower(c)) {
|
||||
if (op_type == OP_ROT13)
|
||||
nc = ROT13(c, 'a');
|
||||
else if (op_type != OP_LOWER)
|
||||
nc = vim_toupper(c);
|
||||
} else if (vim_isupper(c)) {
|
||||
nc = mb_toupper(c);
|
||||
} else if (mb_isupper(c)) {
|
||||
if (op_type == OP_ROT13)
|
||||
nc = ROT13(c, 'A');
|
||||
else if (op_type != OP_UPPER)
|
||||
nc = vim_tolower(c);
|
||||
nc = mb_tolower(c);
|
||||
}
|
||||
if (nc != c) {
|
||||
if (enc_utf8 && (c >= 0x80 || nc >= 0x80)) {
|
||||
@@ -3327,7 +3327,7 @@ void ex_display(exarg_T *eap)
|
||||
|
||||
get_clipboard(name, &yb, true);
|
||||
|
||||
if (name == vim_tolower(redir_reg)
|
||||
if (name == mb_tolower(redir_reg)
|
||||
|| (redir_reg == '"' && yb == y_previous))
|
||||
continue; /* do not list register being written to, the
|
||||
* pointer can be freed */
|
||||
|
Reference in New Issue
Block a user