neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit d238b8f6003d34cae7f65ff7585b48a2cd9449fb
parent 746a29c58041e0470a4e8f9446378caba32f037c
Author: dundargoc <33953936+dundargoc@users.noreply.github.com>
Date:   Thu, 17 Mar 2022 06:21:24 +0100

chore: fix typos (#17670)

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Diffstat:
Mruntime/doc/remote.txt | 2+-
Mruntime/lua/vim/keymap.lua | 4++--
Mruntime/lua/vim/lsp.lua | 2+-
Mruntime/lua/vim/shared.lua | 2+-
Msrc/nvim/api/vim.c | 2+-
Msrc/nvim/api/window.c | 2+-
Msrc/nvim/autocmd.c | 2+-
Msrc/nvim/change.c | 2+-
Msrc/nvim/edit.c | 8++++----
Msrc/nvim/eval/funcs.c | 6+++---
Msrc/nvim/ex_docmd.c | 2+-
Msrc/nvim/ex_getln.c | 2+-
Msrc/nvim/os/pty_process_unix.c | 2+-
Msrc/nvim/os/pty_process_win.c | 2+-
Msrc/nvim/search.c | 2+-
Msrc/nvim/terminal.c | 2+-
Msrc/nvim/tui/input.c | 1+
Msrc/nvim/ui_client.c | 2++
Mtest/functional/terminal/channel_spec.lua | 4++--
19 files changed, 27 insertions(+), 24 deletions(-)

diff --git a/runtime/doc/remote.txt b/runtime/doc/remote.txt @@ -86,7 +86,7 @@ You can not put options there! 2. Missing functionality *E5600* *clientserver-missing* Vim supports additional functionality in clientserver that's not yet -implemented in Nvim. In particular, none of the 'wait' variants are supported +implemented in Nvim. In particular, none of the "wait" variants are supported yet. The following command line arguments are not yet available: argument meaning ~ diff --git a/runtime/lua/vim/keymap.lua b/runtime/lua/vim/keymap.lua @@ -25,8 +25,8 @@ local keymap = {} --- vim.keymap.set('n', 'asdf', require('jkl').my_fun) --- </pre> --- ---- the `require('jkl')` gets evaluated during this call in order to access the function. If you want to ---- avoid this cost at startup you can wrap it in a function, for example: +--- the ``require('jkl')`` gets evaluated during this call in order to access the function. +--- If you want to avoid this cost at startup you can wrap it in a function, for example: --- <pre> --- vim.keymap.set('n', 'asdf', function() return require('jkl').my_fun() end) --- </pre> diff --git a/runtime/lua/vim/lsp.lua b/runtime/lua/vim/lsp.lua @@ -1689,7 +1689,7 @@ end --- --- Currently only supports a single client. This can be set via --- `setlocal formatexpr=v:lua.vim.lsp.formatexpr()` but will typically or in `on_attach` ---- via `vim.api.nvim_buf_set_option(bufnr, 'formatexpr', 'v:lua.vim.lsp.formatexpr(#{timeout_ms:250})')`. +--- via ``vim.api.nvim_buf_set_option(bufnr, 'formatexpr', 'v:lua.vim.lsp.formatexpr(#{timeout_ms:250})')``. --- ---@param opts table options for customizing the formatting expression which takes the --- following optional keys: diff --git a/runtime/lua/vim/shared.lua b/runtime/lua/vim/shared.lua @@ -331,7 +331,7 @@ end --- Add the reverse lookup values to an existing table. --- For example: ---- `tbl_add_reverse_lookup { A = 1 } == { [1] = 'A', A = 1 }` +--- ``tbl_add_reverse_lookup { A = 1 } == { [1] = 'A', A = 1 }`` -- --Do note that it *modifies* the input. ---@param o table The table to add the reverse to. diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c @@ -127,7 +127,7 @@ Dictionary nvim__get_hl_defs(Integer ns_id, Error *err) /// /// Note: Unlike the `:highlight` command which can update a highlight group, /// this function completely replaces the definition. For example: -/// `nvim_set_hl(0, 'Visual', {})` will clear the highlight group 'Visual'. +/// ``nvim_set_hl(0, 'Visual', {})`` will clear the highlight group 'Visual'. /// /// @param ns_id Namespace id for this highlight |nvim_create_namespace()|. /// Use 0 to set a highlight group globally |:highlight|. diff --git a/src/nvim/api/window.c b/src/nvim/api/window.c @@ -71,7 +71,7 @@ ArrayOf(Integer, 2) nvim_win_get_cursor(Window window, Error *err) } /// Sets the (1,0)-indexed cursor position in the window. |api-indexing| -/// Unlike |win_execute()| this scrolls the window. +/// This scrolls the window even if it is not the current one. /// /// @param window Window handle, or 0 for current window /// @param pos (row, col) tuple representing the new position diff --git a/src/nvim/autocmd.c b/src/nvim/autocmd.c @@ -397,7 +397,7 @@ int augroup_add(char *name) } /// Delete the augroup that matches name. -/// @param stupid_legacy_mode bool: This paremeter determines whether to run the augroup +/// @param stupid_legacy_mode bool: This parameter determines whether to run the augroup /// deletion in the same fashion as `:augroup! {name}` where if there are any remaining /// autocmds left in the augroup, it will change the name of the augroup to `--- DELETED ---` /// but leave the autocmds existing. These are _separate_ augroups, so if you do this for diff --git a/src/nvim/change.c b/src/nvim/change.c @@ -408,7 +408,7 @@ void deleted_lines(linenr_T lnum, long count) /// be triggered to display the cursor. void deleted_lines_mark(linenr_T lnum, long count) { - // if we deleted the entire buffer, we need to implicity add a new empty line + // if we deleted the entire buffer, we need to implicitly add a new empty line bool made_empty = (count > 0) && curbuf->b_ml.ml_flags & ML_EMPTY; mark_adjust(lnum, (linenr_T)(lnum + count - 1), (long)MAXLNUM, diff --git a/src/nvim/edit.c b/src/nvim/edit.c @@ -5116,10 +5116,10 @@ static int ins_complete(int c, bool enable_pum) || ctrl_x_mode == CTRL_X_PATH_PATTERNS || ctrl_x_mode == CTRL_X_PATH_DEFINES) { if (compl_startpos.lnum != curwin->w_cursor.lnum) { - /* line (probably) wrapped, set compl_startpos to the - * first non_blank in the line, if it is not a wordchar - * include it to get a better pattern, but then we don't - * want the "\\<" prefix, check it bellow */ + // line (probably) wrapped, set compl_startpos to the + // first non_blank in the line, if it is not a wordchar + // include it to get a better pattern, but then we don't + // want the "\\<" prefix, check it below. compl_col = (colnr_T)getwhitecols(line); compl_startpos.col = compl_col; compl_startpos.lnum = curwin->w_cursor.lnum; diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c @@ -1500,7 +1500,7 @@ static void f_ctxsize(typval_T *argvars, typval_T *rettv, FunPtr fptr) } /// Set the cursor position. -/// If 'charcol' is true, then use the column number as a character offet. +/// If 'charcol' is true, then use the column number as a character offset. /// Otherwise use the column number as a byte offset. static void set_cursorpos(typval_T *argvars, typval_T *rettv, bool charcol) { @@ -7781,7 +7781,7 @@ static void f_reverse(typval_T *argvars, typval_T *rettv, FunPtr fptr) } } -/// "reduce(list, { accumlator, element -> value } [, initial])" function +/// "reduce(list, { accumulator, element -> value } [, initial])" function static void f_reduce(typval_T *argvars, typval_T *rettv, FunPtr fptr) { if (argvars[0].v_type != VAR_LIST && argvars[0].v_type != VAR_BLOB) { @@ -8885,7 +8885,7 @@ static void f_setbufvar(typval_T *argvars, typval_T *rettv, FunPtr fptr) } /// Set the cursor or mark position. -/// If 'charpos' is TRUE, then use the column number as a character offet. +/// If 'charpos' is TRUE, then use the column number as a character offset. /// Otherwise use the column number as a byte offset. static void set_position(typval_T *argvars, typval_T *rettv, bool charpos) { diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c @@ -9655,7 +9655,7 @@ static void ex_filetype(exarg_T *eap) /// Source ftplugin.vim and indent.vim to create the necessary FileType /// autocommands. We do this separately from filetype.vim so that these -/// autocommands will always fire first (and thus can be overriden) while still +/// autocommands will always fire first (and thus can be overridden) while still /// allowing general filetype detection to be disabled in the user's init file. void filetype_plugin_enable(void) { diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c @@ -231,7 +231,7 @@ static int compl_selected; /// |:checkhealth| completion items /// -/// Regenerates on every new command line prompt, to accomodate changes on the +/// Regenerates on every new command line prompt, to accommodate changes on the /// runtime files. typedef struct { garray_T names; // healthcheck names diff --git a/src/nvim/os/pty_process_unix.c b/src/nvim/os/pty_process_unix.c @@ -86,7 +86,7 @@ static int openpty(int *amaster, int *aslave, char *name, struct termios *termp, ioctl(slave, I_PUSH, "ptem"); // ldterm provides most of the termio terminal interface ioctl(slave, I_PUSH, "ldterm"); - // ttcompat compatability with older terminal ioctls + // ttcompat compatibility with older terminal ioctls ioctl(slave, I_PUSH, "ttcompat"); if (termp) { diff --git a/src/nvim/os/pty_process_win.c b/src/nvim/os/pty_process_win.c @@ -307,7 +307,7 @@ static void pty_process_finish2(PtyProcess *ptyproc) /// Build the command line to pass to CreateProcessW. /// /// @param[in] argv Array with string arguments. -/// @param[out] cmd_line Location where saved builded cmd line. +/// @param[out] cmd_line Location where saved built cmd line. /// /// @returns zero on success, or error code of MultiByteToWideChar function. /// diff --git a/src/nvim/search.c b/src/nvim/search.c @@ -5689,7 +5689,7 @@ search_line: // we read a line, set "already" to check this "line" later // if depth >= 0 we'll increase files[depth].lnum far - // bellow -- Acevedo + // below -- Acevedo already = aux = p = skipwhite(line); p = find_word_start(p); p = find_word_end(p); diff --git a/src/nvim/terminal.c b/src/nvim/terminal.c @@ -1288,7 +1288,7 @@ static bool send_mouse_event(Terminal *term, int c) return mouse_win == curwin; } - // ignore left release action if it was not proccessed above + // ignore left release action if it was not processed above // to prevent leaving Terminal mode after entering to it using a mouse if (c == K_LEFTRELEASE && mouse_win->w_buffer->terminal == term) { return false; diff --git a/src/nvim/tui/input.c b/src/nvim/tui/input.c @@ -115,6 +115,7 @@ static void tinput_wait_enqueue(void **argv) { TermInput *input = argv[0]; if (rbuffer_size(input->key_buffer) == 0 && input->paste == 3) { + // End streamed paste with an empty string. const String keys = { .data = "", .size = 0 }; String copy = copy_string(keys); multiqueue_put(main_loop.events, tinput_paste_event, 3, diff --git a/src/nvim/ui_client.c b/src/nvim/ui_client.c @@ -52,6 +52,8 @@ void ui_client_init(uint64_t chan) /// Handler for "redraw" events sent by the NVIM server /// +/// This is just a stub. The mentioned functionality will be implemented. +/// /// This function will be called by handle_request (in msgpack_rpc/channel.c) /// The individual ui_events sent by the server are individually handled /// by their respective handlers defined in ui_events_client.generated.h diff --git a/test/functional/terminal/channel_spec.lua b/test/functional/terminal/channel_spec.lua @@ -33,7 +33,7 @@ describe('terminal channel is closed and later released if', function() -- channel has been closed but not released eq("Vim(call):Can't send data to closed stream", pcall_err(command, [[call chanclose(id) | call chansend(id, 'test')]])) - screen:expect({any='%[Terminal closed]'}) + screen:expect({any='%[Terminal closed%]'}) eq(chans, eval('len(nvim_list_chans())')) -- delete terminal feed('i<CR>') @@ -49,7 +49,7 @@ describe('terminal channel is closed and later released if', function() -- channel has been closed but not released eq("Vim(call):Can't send data to closed stream", pcall_err(command, [[call chanclose(id) | call chansend(id, 'test')]])) - screen:expect({any='%[Terminal closed]'}) + screen:expect({any='%[Terminal closed%]'}) eq(chans, eval('len(nvim_list_chans())')) -- channel still hasn't been released yet eq("Vim(call):Can't send data to closed stream",