diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-12-28 03:28:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-28 10:28:48 +0800 |
commit | 714b075197c02d27d5c05133759ae97bed279b50 (patch) | |
tree | 11f8859706d2b77256717abb4d3df6ad130a904a | |
parent | 46ceefb52be6b014dd27b6adfbca3e1c9dff0c0c (diff) | |
download | rneovim-714b075197c02d27d5c05133759ae97bed279b50.tar.gz rneovim-714b075197c02d27d5c05133759ae97bed279b50.tar.bz2 rneovim-714b075197c02d27d5c05133759ae97bed279b50.zip |
docs: small fixes (#26651)
Co-authored-by: Gregory Anders <greg@gpanders.com>
Co-authored-by: WillLillis <wlillis@umass.edu>
-rw-r--r-- | runtime/doc/api.txt | 1 | ||||
-rw-r--r-- | runtime/doc/news.txt | 6 | ||||
-rw-r--r-- | runtime/lua/vim/_defaults.lua | 2 | ||||
-rw-r--r-- | runtime/lua/vim/_meta/api.lua | 1 | ||||
-rw-r--r-- | runtime/lua/vim/health.lua | 2 | ||||
-rw-r--r-- | src/nvim/api/win_config.c | 1 | ||||
-rw-r--r-- | src/nvim/drawscreen.c | 2 | ||||
-rw-r--r-- | src/nvim/eval/window.c | 2 | ||||
-rw-r--r-- | src/nvim/option_defs.h | 2 | ||||
-rw-r--r-- | src/nvim/popupmenu.c | 4 | ||||
-rw-r--r-- | test/functional/editor/mode_cmdline_spec.lua | 6 |
11 files changed, 13 insertions, 16 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index 6a69bf7b41..b2581c8752 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -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: ~ diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index a256db76d6..abba8fbd75 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -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* diff --git a/runtime/lua/vim/_defaults.lua b/runtime/lua/vim/_defaults.lua index 0d756b8701..af962eea5d 100644 --- a/runtime/lua/vim/_defaults.lua +++ b/runtime/lua/vim/_defaults.lua @@ -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 diff --git a/runtime/lua/vim/_meta/api.lua b/runtime/lua/vim/_meta/api.lua index ba18a16488..d94cef481e 100644 --- a/runtime/lua/vim/_meta/api.lua +++ b/runtime/lua/vim/_meta/api.lua @@ -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 diff --git a/runtime/lua/vim/health.lua b/runtime/lua/vim/health.lua index 6c96a703bb..23771d2807 100644 --- a/runtime/lua/vim/health.lua +++ b/runtime/lua/vim/health.lua @@ -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)) diff --git a/src/nvim/api/win_config.c b/src/nvim/api/win_config.c index be18dba315..64eda43689 100644 --- a/src/nvim/api/win_config.c +++ b/src/nvim/api/win_config.c @@ -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 diff --git a/src/nvim/drawscreen.c b/src/nvim/drawscreen.c index 4200ff70bc..9e3f96d2c2 100644 --- a/src/nvim/drawscreen.c +++ b/src/nvim/drawscreen.c @@ -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 diff --git a/src/nvim/eval/window.c b/src/nvim/eval/window.c index 02f214f262..230aec6abc 100644 --- a/src/nvim/eval/window.c +++ b/src/nvim/eval/window.c @@ -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; diff --git a/src/nvim/option_defs.h b/src/nvim/option_defs.h index c1b9b8d196..f8f01dd993 100644 --- a/src/nvim/option_defs.h +++ b/src/nvim/option_defs.h @@ -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; diff --git a/src/nvim/popupmenu.c b/src/nvim/popupmenu.c index bb4cad0b54..6cc11c1175 100644 --- a/src/nvim/popupmenu.c +++ b/src/nvim/popupmenu.c @@ -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); } diff --git a/test/functional/editor/mode_cmdline_spec.lua b/test/functional/editor/mode_cmdline_spec.lua index d34b5a1a28..e1fe8dead7 100644 --- a/test/functional/editor/mode_cmdline_spec.lua +++ b/test/functional/editor/mode_cmdline_spec.lua @@ -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')) |