mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 14:08:32 +00:00
Move documentation from function declarations to definitions
Uses a perl script to move it (scripts/movedocs.pl)
This commit is contained in:
@@ -8,6 +8,11 @@
|
||||
#include "nvim/api/private/helpers.h"
|
||||
#include "nvim/memory.h"
|
||||
|
||||
/// Gets the number of windows in a tabpage
|
||||
///
|
||||
/// @param tabpage The tabpage
|
||||
/// @param[out] err Details of an error that may have occurred
|
||||
/// @return The number of windows in `tabpage`
|
||||
WindowArray tabpage_get_windows(Tabpage tabpage, Error *err)
|
||||
{
|
||||
WindowArray rv = ARRAY_DICT_INIT;
|
||||
@@ -40,6 +45,12 @@ WindowArray tabpage_get_windows(Tabpage tabpage, Error *err)
|
||||
return rv;
|
||||
}
|
||||
|
||||
/// Gets a tabpage variable
|
||||
///
|
||||
/// @param tabpage The tab page handle
|
||||
/// @param name The variable name
|
||||
/// @param[out] err Details of an error that may have occurred
|
||||
/// @return The variable value
|
||||
Object tabpage_get_var(Tabpage tabpage, String name, Error *err)
|
||||
{
|
||||
tabpage_T *tab = find_tab(tabpage, err);
|
||||
@@ -51,6 +62,13 @@ Object tabpage_get_var(Tabpage tabpage, String name, Error *err)
|
||||
return dict_get_value(tab->tp_vars, name, err);
|
||||
}
|
||||
|
||||
/// Sets a tabpage variable. Passing 'nil' as value deletes the variable.
|
||||
///
|
||||
/// @param tabpage handle
|
||||
/// @param name The variable name
|
||||
/// @param value The variable value
|
||||
/// @param[out] err Details of an error that may have occurred
|
||||
/// @return The tab page handle
|
||||
Object tabpage_set_var(Tabpage tabpage, String name, Object value, Error *err)
|
||||
{
|
||||
tabpage_T *tab = find_tab(tabpage, err);
|
||||
@@ -62,6 +80,11 @@ Object tabpage_set_var(Tabpage tabpage, String name, Object value, Error *err)
|
||||
return dict_set_value(tab->tp_vars, name, value, err);
|
||||
}
|
||||
|
||||
/// Gets the current window in a tab page
|
||||
///
|
||||
/// @param tabpage The tab page handle
|
||||
/// @param[out] err Details of an error that may have occurred
|
||||
/// @return The Window handle
|
||||
Window tabpage_get_window(Tabpage tabpage, Error *err)
|
||||
{
|
||||
Window rv = 0;
|
||||
@@ -87,6 +110,10 @@ Window tabpage_get_window(Tabpage tabpage, Error *err)
|
||||
}
|
||||
}
|
||||
|
||||
/// Checks if a tab page is valid
|
||||
///
|
||||
/// @param tabpage The tab page handle
|
||||
/// @return true if the tab page is valid, false otherwise
|
||||
Boolean tabpage_is_valid(Tabpage tabpage)
|
||||
{
|
||||
Error stub = {.set = false};
|
||||
|
Reference in New Issue
Block a user