docs: small fixes (#26651)

Co-authored-by: Gregory Anders <greg@gpanders.com>
Co-authored-by: WillLillis <wlillis@umass.edu>
This commit is contained in:
dundargoc 2023-12-28 03:28:48 +01:00 committed by GitHub
parent 46ceefb52b
commit 714b075197
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 13 additions and 16 deletions

View File

@ -3110,7 +3110,6 @@ nvim_open_win({buffer}, {enter}, {*config}) *nvim_open_win()*
Example (Lua): buffer-relative float (travels as buffer is scrolled) >lua
vim.api.nvim_open_win(0, false,
{relative='win', width=12, height=3, bufpos={100,10}})
})
<
Attributes: ~

View File

@ -112,9 +112,6 @@ The following changes may require adaptations in user config or plugins.
• 'termguicolors' is enabled by default when Nvim is able to determine that
the host terminal emulator supports 24-bit color.
• `Q` now repeats a macro for each line of a visual selection.
• `@` now repeats the indicated macro for each line of a visual selection.
==============================================================================
BREAKING CHANGES IN HEAD *news-breaking-dev*
@ -275,6 +272,9 @@ The following new APIs and features were added.
• |nvim_input_mouse()| supports mouse buttons "x1" and "x2".
• |v_Q-default| and |v_@-default| repeat a register for each line of a visual
selection.
==============================================================================
CHANGED FEATURES *news-changed*

View File

@ -194,7 +194,7 @@ if tty then
--- already set by the user.
---
--- @param option string Option name
--- @param value string Option value
--- @param value any Option value
local function setoption(option, value)
if vim.api.nvim_get_option_info2(option, {}).was_set then
-- Don't do anything if option is already set

View File

@ -1493,7 +1493,6 @@ function vim.api.nvim_open_term(buffer, opts) end
--- ```lua
--- vim.api.nvim_open_win(0, false,
--- {relative='win', width=12, height=3, bufpos={100,10}})
--- })
--- ```
---
--- @param buffer integer Buffer to display, or 0 for current buffer

View File

@ -251,7 +251,7 @@ local path2name = function(path)
end
local PATTERNS = { '/autoload/health/*.vim', '/lua/**/**/health.lua', '/lua/**/**/health/init.lua' }
-- :checkhealth completion function used by ex_getln.c get_healthcheck_names()
-- :checkhealth completion function used by cmdexpand.c get_healthcheck_names()
M._complete = function()
local names = vim.tbl_flatten(vim.tbl_map(function(pattern)
return vim.tbl_map(path2name, vim.api.nvim_get_runtime_file(pattern, true))

View File

@ -68,7 +68,6 @@
/// ```lua
/// vim.api.nvim_open_win(0, false,
/// {relative='win', width=12, height=3, bufpos={100,10}})
/// })
/// ```
///
/// @param buffer Buffer to display, or 0 for current buffer

View File

@ -1,5 +1,5 @@
// drawscreen.c: Code for updating all the windows on the screen.
// This is the top level, drawline.c is the middle and grid.c/screen.c the lower level.
// This is the top level, drawline.c is the middle and grid.c the lower level.
// update_screen() is the function that updates all windows and status lines.
// It is called from the main loop when must_redraw is non-zero. It may be

View File

@ -485,7 +485,7 @@ void f_tabpagewinnr(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
/// Switch to a window for executing user code.
/// Caller must call win_execute_after() later regardless of return value.
///
/// @return whether switching the window succeded.
/// @return whether switching the window succeeded.
bool win_execute_before(win_execute_T *args, win_T *wp, tabpage_T *tp)
{
args->wp = wp;

View File

@ -58,7 +58,7 @@ typedef struct {
int os_flags;
/// Old value of the option.
/// TODO(famiu): Convert `os_oldval` and `os_newval` to `OptVal` to accomodate multitype options.
/// TODO(famiu): Convert `os_oldval` and `os_newval` to `OptVal` to accommodate multitype options.
OptValData os_oldval;
/// New value of the option.
OptValData os_newval;

View File

@ -659,7 +659,7 @@ void pum_redraw(void)
}
}
/// create a floting preview window for info
/// create a floating preview window for info
/// @return NULL when no enough room to show
static win_T *pum_create_float_preview(bool enter)
{
@ -971,7 +971,7 @@ static bool pum_set_selected(int n, int repeat)
if (curwin->w_p_wrap) {
lnum += plines_win(curwin, lnum, true);
}
// adjust floting window by actually height and max info text width
// adjust floating window by actually height and max info text width
pum_adjust_float_position(curwin, lnum, max_info_width);
}

View File

@ -72,7 +72,7 @@ describe('cmdline', function()
describe('history', function()
it('correctly clears start of the history', function()
-- Regression test: check absence of the memory leak when clearing start of
-- the history using ex_getln.c/clr_history().
-- the history using cmdhist.c/clr_history().
eq(1, funcs.histadd(':', 'foo'))
eq(1, funcs.histdel(':'))
eq('', funcs.histget(':', -1))
@ -80,7 +80,7 @@ describe('cmdline', function()
it('correctly clears end of the history', function()
-- Regression test: check absence of the memory leak when clearing end of
-- the history using ex_getln.c/clr_history().
-- the history using cmdhist.c/clr_history().
meths.set_option_value('history', 1, {})
eq(1, funcs.histadd(':', 'foo'))
eq(1, funcs.histdel(':'))
@ -88,7 +88,7 @@ describe('cmdline', function()
end)
it('correctly removes item from history', function()
-- Regression test: check that ex_getln.c/del_history_idx() correctly clears
-- Regression test: check that cmdhist.c/del_history_idx() correctly clears
-- history index after removing history entry. If it does not then deleting
-- history will result in a double free.
eq(1, funcs.histadd(':', 'foo'))