mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 22:18:33 +00:00
*: Partial string handling refactoring
Main points: - Replace `char_u` with `char` in some cases. - Remove `str[len] = NUL` hack in some cases when `str` may be considered `const`.
This commit is contained in:
@@ -2250,7 +2250,7 @@ void ex_compiler(exarg_T *eap)
|
||||
// plugin will then skip the settings. Afterwards set
|
||||
// "b:current_compiler" and restore "current_compiler".
|
||||
// Explicitly prepend "g:" to make it work in a function.
|
||||
old_cur_comp = get_var_value((char_u *)"g:current_compiler");
|
||||
old_cur_comp = get_var_value("g:current_compiler");
|
||||
if (old_cur_comp != NULL) {
|
||||
old_cur_comp = vim_strsave(old_cur_comp);
|
||||
}
|
||||
@@ -2268,7 +2268,7 @@ void ex_compiler(exarg_T *eap)
|
||||
do_cmdline_cmd(":delcommand CompilerSet");
|
||||
|
||||
// Set "b:current_compiler" from "current_compiler".
|
||||
p = get_var_value((char_u *)"g:current_compiler");
|
||||
p = get_var_value("g:current_compiler");
|
||||
if (p != NULL) {
|
||||
set_internal_string_var((char_u *)"b:current_compiler", p);
|
||||
}
|
||||
|
Reference in New Issue
Block a user