diff options
| author | bfredl <bjorn.linse@gmail.com> | 2022-09-06 20:38:26 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-06 20:38:26 +0200 |
| commit | 74a8b5982a27cdccc6505343a9feeba1b3e74e31 (patch) | |
| tree | 5e85d41e4115977863908fbcded226169b02ebd8 /src/nvim/indent_c.c | |
| parent | 707edfc9e6a1745f268d1a9184183da521dc86b8 (diff) | |
| parent | 73207cae611a1efb8cd17139e8228772daeb9866 (diff) | |
| download | rneovim-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/indent_c.c')
| -rw-r--r-- | src/nvim/indent_c.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/indent_c.c b/src/nvim/indent_c.c index 5941473825..c7f37790b6 100644 --- a/src/nvim/indent_c.c +++ b/src/nvim/indent_c.c @@ -1838,7 +1838,7 @@ int get_c_indent(void) int cur_amount = MAXCOL; colnr_T col; char_u *theline; - char_u *linecopy; + char *linecopy; pos_T *trypos; pos_T *comment_pos; pos_T *tryposBrace = NULL; @@ -1893,7 +1893,7 @@ int get_c_indent(void) // Get a copy of the current contents of the line. // This is required, because only the most recent line obtained with // ml_get is valid! - linecopy = vim_strsave((char_u *)ml_get(cur_curpos.lnum)); + linecopy = xstrdup(ml_get(cur_curpos.lnum)); // In insert mode and the cursor is on a ')' truncate the line at the // cursor position. We don't want to line up with the matching '(' when @@ -1906,7 +1906,7 @@ int get_c_indent(void) linecopy[curwin->w_cursor.col] = NUL; } - theline = (char_u *)skipwhite((char *)linecopy); + theline = (char_u *)skipwhite(linecopy); // move the cursor to the start of the line |