diff options
author | bfredl <bjorn.linse@gmail.com> | 2022-09-12 21:50:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-12 21:50:31 +0200 |
commit | f6232e160b96e2607edcd5afa7207a1e4aadf805 (patch) | |
tree | 41fa053ec7eff6b7edd278ec892392896f984722 /src/nvim/edit.c | |
parent | fd70e2bff2440181f63fe124738cf2a025d1e6a5 (diff) | |
parent | 3ff46544c9872b4161fd098569c30b55fe3abd36 (diff) | |
download | rneovim-f6232e160b96e2607edcd5afa7207a1e4aadf805.tar.gz rneovim-f6232e160b96e2607edcd5afa7207a1e4aadf805.tar.bz2 rneovim-f6232e160b96e2607edcd5afa7207a1e4aadf805.zip |
Merge pull request #20077 from dundargoc/refactor/char_u/11
refactor: replace char_u with char 11: remove `STRLEN` part 1
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r-- | src/nvim/edit.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c index 1a8030d511..a165078bdf 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -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); |