mirror of
https://github.com/neovim/neovim.git
synced 2025-09-22 03:08:27 +00:00
api: Add FUNC_ATTR_DEFERRED attribute to a number of functions
Any function that can directly mutate the screen or execute vimscript had the attribute applied.
This commit is contained in:
@@ -52,6 +52,7 @@ ArrayOf(Integer, 2) window_get_cursor(Window window, Error *err)
|
||||
/// @param pos the (row, col) tuple representing the new position
|
||||
/// @param[out] err Details of an error that may have occurred
|
||||
void window_set_cursor(Window window, ArrayOf(Integer, 2) pos, Error *err)
|
||||
FUNC_ATTR_DEFERRED
|
||||
{
|
||||
win_T *win = find_window_by_handle(window, err);
|
||||
|
||||
@@ -111,6 +112,7 @@ Integer window_get_height(Window window, Error *err)
|
||||
/// @param height the new height in rows
|
||||
/// @param[out] err Details of an error that may have occurred
|
||||
void window_set_height(Window window, Integer height, Error *err)
|
||||
FUNC_ATTR_DEFERRED
|
||||
{
|
||||
win_T *win = find_window_by_handle(window, err);
|
||||
|
||||
@@ -154,6 +156,7 @@ Integer window_get_width(Window window, Error *err)
|
||||
/// @param width the new width in columns
|
||||
/// @param[out] err Details of an error that may have occurred
|
||||
void window_set_width(Window window, Integer width, Error *err)
|
||||
FUNC_ATTR_DEFERRED
|
||||
{
|
||||
win_T *win = find_window_by_handle(window, err);
|
||||
|
||||
@@ -199,6 +202,7 @@ Object window_get_var(Window window, String name, Error *err)
|
||||
/// @param[out] err Details of an error that may have occurred
|
||||
/// @return The old value
|
||||
Object window_set_var(Window window, String name, Object value, Error *err)
|
||||
FUNC_ATTR_DEFERRED
|
||||
{
|
||||
win_T *win = find_window_by_handle(window, err);
|
||||
|
||||
@@ -234,6 +238,7 @@ Object window_get_option(Window window, String name, Error *err)
|
||||
/// @param value The option value
|
||||
/// @param[out] err Details of an error that may have occurred
|
||||
void window_set_option(Window window, String name, Object value, Error *err)
|
||||
FUNC_ATTR_DEFERRED
|
||||
{
|
||||
win_T *win = find_window_by_handle(window, err);
|
||||
|
||||
|
Reference in New Issue
Block a user