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/api/private/helpers.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/api/private/helpers.c')
-rw-r--r-- | src/nvim/api/private/helpers.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/api/private/helpers.c b/src/nvim/api/private/helpers.c index ebcf6cca6d..22d2ffbaf1 100644 --- a/src/nvim/api/private/helpers.c +++ b/src/nvim/api/private/helpers.c @@ -466,7 +466,7 @@ bool buf_collect_lines(buf_T *buf, size_t n, int64_t start, bool replace_nl, Arr return false; } - const char *bufstr = (char *)ml_get_buf(buf, (linenr_T)lnum, false); + const char *bufstr = ml_get_buf(buf, (linenr_T)lnum, false); Object str = STRING_OBJ(cstr_to_string(bufstr)); if (replace_nl) { @@ -499,7 +499,7 @@ String buf_get_text(buf_T *buf, int64_t lnum, int64_t start_col, int64_t end_col return rv; } - const char *bufstr = (char *)ml_get_buf(buf, (linenr_T)lnum, false); + const char *bufstr = ml_get_buf(buf, (linenr_T)lnum, false); size_t line_length = strlen(bufstr); start_col = start_col < 0 ? (int64_t)line_length + start_col + 1 : start_col; |