mirror of
https://github.com/neovim/neovim.git
synced 2025-09-30 23:18:33 +00:00
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
This commit is contained in:
@@ -1773,7 +1773,7 @@ void truncate_spaces(char *line)
|
||||
int i;
|
||||
|
||||
// find start of trailing white space
|
||||
for (i = (int)STRLEN(line) - 1; i >= 0 && ascii_iswhite(line[i]); i--) {
|
||||
for (i = (int)strlen(line) - 1; i >= 0 && ascii_iswhite(line[i]); i--) {
|
||||
if (State & REPLACE_FLAG) {
|
||||
replace_join(0); // remove a NUL from the replace stack
|
||||
}
|
||||
@@ -2676,7 +2676,7 @@ int stuff_inserted(int c, long count, int no_esc)
|
||||
// when the last char is either "0" or "^" it will be quoted if no ESC
|
||||
// comes after it OR if it will inserted more than once and "ptr"
|
||||
// starts with ^D. -- Acevedo
|
||||
last_ptr = (esc_ptr ? esc_ptr : ptr + STRLEN(ptr)) - 1;
|
||||
last_ptr = (esc_ptr ? esc_ptr : ptr + strlen(ptr)) - 1;
|
||||
if (last_ptr >= ptr && (*last_ptr == '0' || *last_ptr == '^')
|
||||
&& (no_esc || (*ptr == Ctrl_D && count > 1))) {
|
||||
last = *last_ptr;
|
||||
@@ -2938,7 +2938,7 @@ static void replace_do_bs(int limit_col)
|
||||
}
|
||||
(void)del_char_after_col(limit_col);
|
||||
if (l_State & VREPLACE_FLAG) {
|
||||
orig_len = (int)STRLEN(get_cursor_pos_ptr());
|
||||
orig_len = (int)strlen(get_cursor_pos_ptr());
|
||||
}
|
||||
replace_push(cc);
|
||||
replace_pop_ins();
|
||||
@@ -3856,7 +3856,7 @@ static bool ins_bs(int c, int mode, int *inserted_space_p)
|
||||
return false;
|
||||
}
|
||||
Insstart.lnum--;
|
||||
Insstart.col = (colnr_T)STRLEN(ml_get(Insstart.lnum));
|
||||
Insstart.col = (colnr_T)strlen(ml_get(Insstart.lnum));
|
||||
}
|
||||
// In replace mode:
|
||||
// cc < 0: NL was inserted, delete it
|
||||
@@ -4674,7 +4674,7 @@ bool ins_eol(int c)
|
||||
|
||||
// NL in reverse insert will always start in the end of current line.
|
||||
if (revins_on) {
|
||||
curwin->w_cursor.col += (colnr_T)STRLEN(get_cursor_pos_ptr());
|
||||
curwin->w_cursor.col += (colnr_T)strlen(get_cursor_pos_ptr());
|
||||
}
|
||||
|
||||
AppendToRedobuff(NL_STR);
|
||||
|
Reference in New Issue
Block a user