diff options
Diffstat (limited to 'src/nvim/change.c')
| -rw-r--r-- | src/nvim/change.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/nvim/change.c b/src/nvim/change.c index 2450c56838..6ec4979dac 100644 --- a/src/nvim/change.c +++ b/src/nvim/change.c @@ -63,7 +63,7 @@ void change_warning(buf_T *buf, int col) } msg_source(HL_ATTR(HLF_W)); msg_ext_set_kind("wmsg"); - MSG_PUTS_ATTR(_(w_readonly), HL_ATTR(HLF_W) | MSG_HIST); + msg_puts_attr(_(w_readonly), HL_ATTR(HLF_W) | MSG_HIST); set_vim_var_string(VV_WARNINGMSG, _(w_readonly), -1); msg_clr_eos(); (void)msg_end(); @@ -602,7 +602,7 @@ void ins_char_bytes(char_u *buf, size_t charlen) if (vcol > new_vcol && oldp[col + oldlen] == TAB) { break; } - oldlen += (size_t)(*mb_ptr2len)(oldp + col + oldlen); + oldlen += (size_t)utfc_ptr2len(oldp + col + oldlen); // Deleted a bit too much, insert spaces. if (vcol > new_vcol) { newlen += (size_t)(vcol - new_vcol); @@ -611,7 +611,7 @@ void ins_char_bytes(char_u *buf, size_t charlen) curwin->w_p_list = old_list; } else if (oldp[col] != NUL) { // normal replace - oldlen = (size_t)(*mb_ptr2len)(oldp + col); + oldlen = (size_t)utfc_ptr2len(oldp + col); } @@ -725,7 +725,7 @@ int del_chars(long count, int fixpos) p = get_cursor_pos_ptr(); for (i = 0; i < count && *p != NUL; i++) { - l = (*mb_ptr2len)(p); + l = utfc_ptr2len(p); bytes += l; p += l; } @@ -759,7 +759,7 @@ int del_bytes(colnr_T count, bool fixpos_arg, bool use_delcombine) } // If "count" is negative the caller must be doing something wrong. if (count < 1) { - IEMSGN("E292: Invalid count for del_bytes(): %ld", count); + siemsg("E292: Invalid count for del_bytes(): %ld", (int64_t)count); return FAIL; } @@ -778,7 +778,7 @@ int del_bytes(colnr_T count, bool fixpos_arg, bool use_delcombine) col = n; count = utf_ptr2len(oldp + n); n += count; - } while (UTF_COMPOSINGLIKE(oldp + col, oldp + n)); + } while (utf_composinglike(oldp + col, oldp + n)); fixpos = false; } } @@ -1426,7 +1426,7 @@ int open_line(int dir, int flags, int second_line_indent) int l; for (i = 0; i < lead_len && p[i] != NUL; i += l) { - l = (*mb_ptr2len)(p + i); + l = utfc_ptr2len(p + i); if (vim_strnsize(p, i + l) > repl_size) { break; } @@ -1449,7 +1449,7 @@ int open_line(int dir, int flags, int second_line_indent) lead_len--; memmove(p, p + 1, (size_t)(leader + lead_len - p)); } else { - int l = (*mb_ptr2len)(p); + int l = utfc_ptr2len(p); if (l > 1) { if (ptr2cells(p) > 1) { |
