aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_getln.c
diff options
context:
space:
mode:
authorZviRackover <zvirack@gmail.com>2018-09-02 00:58:30 +0300
committerZviRackover <zvirack@gmail.com>2018-09-09 10:45:50 +0300
commitcbdbc4f63d68a6b17b9eea5c67130e37d3d0f278 (patch)
tree5d82993e830a807647ec81aad1d5a391e4490cb0 /src/nvim/ex_getln.c
parent50eadfe2e991a0bb5fe0f98377d91702f0a20492 (diff)
downloadrneovim-cbdbc4f63d68a6b17b9eea5c67130e37d3d0f278.tar.gz
rneovim-cbdbc4f63d68a6b17b9eea5c67130e37d3d0f278.tar.bz2
rneovim-cbdbc4f63d68a6b17b9eea5c67130e37d3d0f278.zip
Refactor: Remove occurences of mb_char2bytes
Diffstat (limited to 'src/nvim/ex_getln.c')
-rw-r--r--src/nvim/ex_getln.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
index 31231fe725..bfca888dc5 100644
--- a/src/nvim/ex_getln.c
+++ b/src/nvim/ex_getln.c
@@ -1763,7 +1763,7 @@ static int command_line_handle_key(CommandLineState *s)
put_on_cmdline(get_special_key_name(s->c, mod_mask), -1, true);
} else {
if (has_mbyte) {
- s->j = (*mb_char2bytes)(s->c, IObuff);
+ s->j = utf_char2bytes(s->c, IObuff);
IObuff[s->j] = NUL; // exclude composing chars
put_on_cmdline(IObuff, s->j, true);
} else {
@@ -2373,7 +2373,7 @@ redraw:
c1 = '?';
}
if (has_mbyte) {
- len = (*mb_char2bytes)(c1, (char_u *)line_ga.ga_data + line_ga.ga_len);
+ len = utf_char2bytes(c1, (char_u *)line_ga.ga_data + line_ga.ga_len);
} else {
len = 1;
((char_u *)line_ga.ga_data)[line_ga.ga_len] = c1;
@@ -2897,11 +2897,11 @@ static void draw_cmdline(int start, int len)
u8c = arabic_shape(u8c, NULL, &u8cc[0], pc, pc1, nc);
- newlen += (*mb_char2bytes)(u8c, arshape_buf + newlen);
+ newlen += utf_char2bytes(u8c, arshape_buf + newlen);
if (u8cc[0] != 0) {
- newlen += (*mb_char2bytes)(u8cc[0], arshape_buf + newlen);
+ newlen += utf_char2bytes(u8cc[0], arshape_buf + newlen);
if (u8cc[1] != 0)
- newlen += (*mb_char2bytes)(u8cc[1],
+ newlen += utf_char2bytes(u8cc[1],
arshape_buf + newlen);
}
} else {