mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
docs: small fixes (#26651)
Co-authored-by: Gregory Anders <greg@gpanders.com> Co-authored-by: WillLillis <wlillis@umass.edu>
This commit is contained in:
parent
46ceefb52b
commit
714b075197
@ -3110,7 +3110,6 @@ nvim_open_win({buffer}, {enter}, {*config}) *nvim_open_win()*
|
|||||||
Example (Lua): buffer-relative float (travels as buffer is scrolled) >lua
|
Example (Lua): buffer-relative float (travels as buffer is scrolled) >lua
|
||||||
vim.api.nvim_open_win(0, false,
|
vim.api.nvim_open_win(0, false,
|
||||||
{relative='win', width=12, height=3, bufpos={100,10}})
|
{relative='win', width=12, height=3, bufpos={100,10}})
|
||||||
})
|
|
||||||
<
|
<
|
||||||
|
|
||||||
Attributes: ~
|
Attributes: ~
|
||||||
|
@ -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
|
• 'termguicolors' is enabled by default when Nvim is able to determine that
|
||||||
the host terminal emulator supports 24-bit color.
|
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*
|
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".
|
• |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*
|
CHANGED FEATURES *news-changed*
|
||||||
|
|
||||||
|
@ -194,7 +194,7 @@ if tty then
|
|||||||
--- already set by the user.
|
--- already set by the user.
|
||||||
---
|
---
|
||||||
--- @param option string Option name
|
--- @param option string Option name
|
||||||
--- @param value string Option value
|
--- @param value any Option value
|
||||||
local function setoption(option, value)
|
local function setoption(option, value)
|
||||||
if vim.api.nvim_get_option_info2(option, {}).was_set then
|
if vim.api.nvim_get_option_info2(option, {}).was_set then
|
||||||
-- Don't do anything if option is already set
|
-- Don't do anything if option is already set
|
||||||
|
1
runtime/lua/vim/_meta/api.lua
generated
1
runtime/lua/vim/_meta/api.lua
generated
@ -1493,7 +1493,6 @@ function vim.api.nvim_open_term(buffer, opts) end
|
|||||||
--- ```lua
|
--- ```lua
|
||||||
--- vim.api.nvim_open_win(0, false,
|
--- vim.api.nvim_open_win(0, false,
|
||||||
--- {relative='win', width=12, height=3, bufpos={100,10}})
|
--- {relative='win', width=12, height=3, bufpos={100,10}})
|
||||||
--- })
|
|
||||||
--- ```
|
--- ```
|
||||||
---
|
---
|
||||||
--- @param buffer integer Buffer to display, or 0 for current buffer
|
--- @param buffer integer Buffer to display, or 0 for current buffer
|
||||||
|
@ -251,7 +251,7 @@ local path2name = function(path)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local PATTERNS = { '/autoload/health/*.vim', '/lua/**/**/health.lua', '/lua/**/**/health/init.lua' }
|
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()
|
M._complete = function()
|
||||||
local names = vim.tbl_flatten(vim.tbl_map(function(pattern)
|
local names = vim.tbl_flatten(vim.tbl_map(function(pattern)
|
||||||
return vim.tbl_map(path2name, vim.api.nvim_get_runtime_file(pattern, true))
|
return vim.tbl_map(path2name, vim.api.nvim_get_runtime_file(pattern, true))
|
||||||
|
@ -68,7 +68,6 @@
|
|||||||
/// ```lua
|
/// ```lua
|
||||||
/// vim.api.nvim_open_win(0, false,
|
/// vim.api.nvim_open_win(0, false,
|
||||||
/// {relative='win', width=12, height=3, bufpos={100,10}})
|
/// {relative='win', width=12, height=3, bufpos={100,10}})
|
||||||
/// })
|
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
/// @param buffer Buffer to display, or 0 for current buffer
|
/// @param buffer Buffer to display, or 0 for current buffer
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// drawscreen.c: Code for updating all the windows on the screen.
|
// 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.
|
// 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
|
// It is called from the main loop when must_redraw is non-zero. It may be
|
||||||
|
@ -485,7 +485,7 @@ void f_tabpagewinnr(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
|
|||||||
/// Switch to a window for executing user code.
|
/// Switch to a window for executing user code.
|
||||||
/// Caller must call win_execute_after() later regardless of return value.
|
/// 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)
|
bool win_execute_before(win_execute_T *args, win_T *wp, tabpage_T *tp)
|
||||||
{
|
{
|
||||||
args->wp = wp;
|
args->wp = wp;
|
||||||
|
@ -58,7 +58,7 @@ typedef struct {
|
|||||||
int os_flags;
|
int os_flags;
|
||||||
|
|
||||||
/// Old value of the option.
|
/// 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;
|
OptValData os_oldval;
|
||||||
/// New value of the option.
|
/// New value of the option.
|
||||||
OptValData os_newval;
|
OptValData os_newval;
|
||||||
|
@ -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
|
/// @return NULL when no enough room to show
|
||||||
static win_T *pum_create_float_preview(bool enter)
|
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) {
|
if (curwin->w_p_wrap) {
|
||||||
lnum += plines_win(curwin, lnum, true);
|
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);
|
pum_adjust_float_position(curwin, lnum, max_info_width);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ describe('cmdline', function()
|
|||||||
describe('history', function()
|
describe('history', function()
|
||||||
it('correctly clears start of the history', function()
|
it('correctly clears start of the history', function()
|
||||||
-- Regression test: check absence of the memory leak when clearing start of
|
-- 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.histadd(':', 'foo'))
|
||||||
eq(1, funcs.histdel(':'))
|
eq(1, funcs.histdel(':'))
|
||||||
eq('', funcs.histget(':', -1))
|
eq('', funcs.histget(':', -1))
|
||||||
@ -80,7 +80,7 @@ describe('cmdline', function()
|
|||||||
|
|
||||||
it('correctly clears end of the history', function()
|
it('correctly clears end of the history', function()
|
||||||
-- Regression test: check absence of the memory leak when clearing end of
|
-- 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, {})
|
meths.set_option_value('history', 1, {})
|
||||||
eq(1, funcs.histadd(':', 'foo'))
|
eq(1, funcs.histadd(':', 'foo'))
|
||||||
eq(1, funcs.histdel(':'))
|
eq(1, funcs.histdel(':'))
|
||||||
@ -88,7 +88,7 @@ describe('cmdline', function()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
it('correctly removes item from history', function()
|
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 index after removing history entry. If it does not then deleting
|
||||||
-- history will result in a double free.
|
-- history will result in a double free.
|
||||||
eq(1, funcs.histadd(':', 'foo'))
|
eq(1, funcs.histadd(':', 'foo'))
|
||||||
|
Loading…
Reference in New Issue
Block a user