mirror of
https://github.com/neovim/neovim.git
synced 2025-09-17 16:58:17 +00:00
api: move deprecated functions to separate files
Most these are just calls to non-deprecated variants, and take up unnecessary space and search hits in the other files.
This commit is contained in:
@@ -288,48 +288,6 @@ void nvim_win_del_var(Window window, String name, Error *err)
|
||||
dict_set_var(win->w_vars, name, NIL, true, false, err);
|
||||
}
|
||||
|
||||
/// Sets a window-scoped (w:) variable
|
||||
///
|
||||
/// @deprecated
|
||||
///
|
||||
/// @param window Window handle, or 0 for current window
|
||||
/// @param name Variable name
|
||||
/// @param value Variable value
|
||||
/// @param[out] err Error details, if any
|
||||
/// @return Old value or nil if there was no previous value.
|
||||
///
|
||||
/// @warning It may return nil if there was no previous value
|
||||
/// or if previous value was `v:null`.
|
||||
Object window_set_var(Window window, String name, Object value, Error *err)
|
||||
{
|
||||
win_T *win = find_window_by_handle(window, err);
|
||||
|
||||
if (!win) {
|
||||
return (Object) OBJECT_INIT;
|
||||
}
|
||||
|
||||
return dict_set_var(win->w_vars, name, value, false, true, err);
|
||||
}
|
||||
|
||||
/// Removes a window-scoped (w:) variable
|
||||
///
|
||||
/// @deprecated
|
||||
///
|
||||
/// @param window Window handle, or 0 for current window
|
||||
/// @param name variable name
|
||||
/// @param[out] err Error details, if any
|
||||
/// @return Old value
|
||||
Object window_del_var(Window window, String name, Error *err)
|
||||
{
|
||||
win_T *win = find_window_by_handle(window, err);
|
||||
|
||||
if (!win) {
|
||||
return (Object) OBJECT_INIT;
|
||||
}
|
||||
|
||||
return dict_set_var(win->w_vars, name, NIL, true, true, err);
|
||||
}
|
||||
|
||||
/// Gets a window option value
|
||||
///
|
||||
/// @param window Window handle, or 0 for current window
|
||||
|
Reference in New Issue
Block a user