aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/change.c
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2022-09-06 20:38:26 +0200
committerGitHub <noreply@github.com>2022-09-06 20:38:26 +0200
commit74a8b5982a27cdccc6505343a9feeba1b3e74e31 (patch)
tree5e85d41e4115977863908fbcded226169b02ebd8 /src/nvim/change.c
parent707edfc9e6a1745f268d1a9184183da521dc86b8 (diff)
parent73207cae611a1efb8cd17139e8228772daeb9866 (diff)
downloadrneovim-74a8b5982a27cdccc6505343a9feeba1b3e74e31.tar.gz
rneovim-74a8b5982a27cdccc6505343a9feeba1b3e74e31.tar.bz2
rneovim-74a8b5982a27cdccc6505343a9feeba1b3e74e31.zip
Merge pull request #20031 from dundargoc/refactor/char_u/8
refactor: replace char_u with char 8: remove `vim_strsave`
Diffstat (limited to 'src/nvim/change.c')
-rw-r--r--src/nvim/change.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/change.c b/src/nvim/change.c
index 5e9edac4f2..f4568fc617 100644
--- a/src/nvim/change.c
+++ b/src/nvim/change.c
@@ -774,7 +774,7 @@ int del_char(bool fixpos)
int del_chars(long count, int fixpos)
{
int bytes = 0;
- char *p = (char *)get_cursor_pos_ptr();
+ char *p = get_cursor_pos_ptr();
for (long i = 0; i < count && *p != NUL; i++) {
int l = utfc_ptr2len(p);
bytes += l;
@@ -1036,7 +1036,7 @@ int open_line(int dir, int flags, int second_line_indent, bool *did_do_comment)
colnr_T mincol = curwin->w_cursor.col + 1;
// make a copy of the current line so we can mess with it
- char *saved_line = (char *)vim_strsave((char_u *)get_cursor_line_ptr());
+ char *saved_line = xstrdup(get_cursor_line_ptr());
if (State & VREPLACE_FLAG) {
// With MODE_VREPLACE we make a copy of the next line, which we will be