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/help.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/help.c')
-rw-r--r-- | src/nvim/help.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/nvim/help.c b/src/nvim/help.c index 245d80489f..235f64744a 100644 --- a/src/nvim/help.c +++ b/src/nvim/help.c @@ -180,7 +180,7 @@ void ex_help(exarg_T *eap) // It is needed for do_tag top open folds under the cursor. KeyTyped = old_KeyTyped; - do_tag((char_u *)tag, DT_HELP, 1, false, true); + do_tag(tag, DT_HELP, 1, false, true); // Delete the empty buffer if we're not using it. Careful: autocommands // may have jumped to another window, check that the buffer is not in a @@ -658,13 +658,13 @@ void fix_help_buffer(void) if (!syntax_present(curwin)) { for (lnum = 1; lnum <= curbuf->b_ml.ml_line_count; lnum++) { - line = (char *)ml_get_buf(curbuf, lnum, false); + line = ml_get_buf(curbuf, lnum, false); const size_t len = STRLEN(line); if (in_example && len > 0 && !ascii_iswhite(line[0])) { // End of example: non-white or '<' in first column. if (line[0] == '<') { // blank-out a '<' in the first column - line = (char *)ml_get_buf(curbuf, lnum, true); + line = ml_get_buf(curbuf, lnum, true); line[0] = ' '; } in_example = false; @@ -672,12 +672,12 @@ void fix_help_buffer(void) if (!in_example && len > 0) { if (line[len - 1] == '>' && (len == 1 || line[len - 2] == ' ')) { // blank-out a '>' in the last column (start of example) - line = (char *)ml_get_buf(curbuf, lnum, true); + line = ml_get_buf(curbuf, lnum, true); line[len - 1] = ' '; in_example = true; } else if (line[len - 1] == '~') { // blank-out a '~' at the end of line (header marker) - line = (char *)ml_get_buf(curbuf, lnum, true); + line = ml_get_buf(curbuf, lnum, true); line[len - 1] = ' '; } } @@ -694,7 +694,7 @@ void fix_help_buffer(void) && TOLOWER_ASC(fname[7]) == 'x' && fname[8] == NUL)) { for (lnum = 1; lnum < curbuf->b_ml.ml_line_count; lnum++) { - line = (char *)ml_get_buf(curbuf, lnum, false); + line = ml_get_buf(curbuf, lnum, false); if (strstr(line, "*local-additions*") == NULL) { continue; } @@ -1167,8 +1167,7 @@ void ex_helptags(exarg_T *eap) } else { ExpandInit(&xpc); xpc.xp_context = EXPAND_DIRECTORIES; - dirname = (char *)ExpandOne(&xpc, (char_u *)eap->arg, NULL, - WILD_LIST_NOTFOUND|WILD_SILENT, WILD_EXPAND_FREE); + dirname = ExpandOne(&xpc, eap->arg, NULL, WILD_LIST_NOTFOUND|WILD_SILENT, WILD_EXPAND_FREE); if (dirname == NULL || !os_isdir(dirname)) { semsg(_("E150: Not a directory: %s"), eap->arg); } else { |