doc: clarify window-id, tab-id, nvim_set_current_x #32528

Problem:
Descriptions are somewhat vague. nvim_set_current_line modifies contents
but nvim_set_current_buf does not, etc.

Solution:
- Make it clear that these functions accept or return a winid/tabid by
  linking to that concept in help.
- Only these few files use the term "handles", so replace them with the
  more conventional terminology.
- Add a new help section for tab-ID. This concept is unique to neovim
  because vim exposes tabnr, but not tab handles. This section is
  modelled after `:h winid`.
This commit is contained in:
David Briscoe
2025-02-27 02:05:00 -08:00
committed by GitHub
parent 746139fa1e
commit 6a9555c0fa
12 changed files with 150 additions and 139 deletions

View File

@@ -488,7 +488,7 @@ Object buffer_del_var(Buffer buffer, String name, Arena *arena, Error *err)
///
/// @deprecated
///
/// @param window Window handle, or 0 for current window
/// @param window |window-ID|, or 0 for current window
/// @param name Variable name
/// @param value Variable value
/// @param[out] err Error details, if any
@@ -512,7 +512,7 @@ Object window_set_var(Window window, String name, Object value, Arena *arena, Er
///
/// @deprecated
///
/// @param window Window handle, or 0 for current window
/// @param window |window-ID|, or 0 for current window
/// @param name variable name
/// @param[out] err Error details, if any
/// @return Old value
@@ -532,7 +532,7 @@ Object window_del_var(Window window, String name, Arena *arena, Error *err)
///
/// @deprecated
///
/// @param tabpage Tabpage handle, or 0 for current tabpage
/// @param tabpage |tab-ID|, or 0 for current tabpage
/// @param name Variable name
/// @param value Variable value
/// @param[out] err Error details, if any
@@ -556,7 +556,7 @@ Object tabpage_set_var(Tabpage tabpage, String name, Object value, Arena *arena,
///
/// @deprecated
///
/// @param tabpage Tabpage handle, or 0 for current tabpage
/// @param tabpage |tab-ID|, or 0 for current tabpage
/// @param name Variable name
/// @param[out] err Error details, if any
/// @return Old value
@@ -684,7 +684,7 @@ void nvim_buf_set_option(uint64_t channel_id, Buffer buffer, String name, Object
/// Gets a window option value
///
/// @deprecated
/// @param window Window handle, or 0 for current window
/// @param window |window-ID|, or 0 for current window
/// @param name Option name
/// @param[out] err Error details, if any
/// @return Option value
@@ -707,7 +707,7 @@ Object nvim_win_get_option(Window window, String name, Error *err)
///
/// @deprecated
/// @param channel_id
/// @param window Window handle, or 0 for current window
/// @param window |window-ID|, or 0 for current window
/// @param name Option name
/// @param value Option value
/// @param[out] err Error details, if any