aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2022-03-17 06:21:24 +0100
committerGitHub <noreply@github.com>2022-03-17 13:21:24 +0800
commitd238b8f6003d34cae7f65ff7585b48a2cd9449fb (patch)
tree743b7bf9e15c0587c09dff05a84468114db664e4
parent746a29c58041e0470a4e8f9446378caba32f037c (diff)
downloadrneovim-d238b8f6003d34cae7f65ff7585b48a2cd9449fb.tar.gz
rneovim-d238b8f6003d34cae7f65ff7585b48a2cd9449fb.tar.bz2
rneovim-d238b8f6003d34cae7f65ff7585b48a2cd9449fb.zip
chore: fix typos (#17670)
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
-rw-r--r--runtime/doc/remote.txt2
-rw-r--r--runtime/lua/vim/keymap.lua4
-rw-r--r--runtime/lua/vim/lsp.lua2
-rw-r--r--runtime/lua/vim/shared.lua2
-rw-r--r--src/nvim/api/vim.c2
-rw-r--r--src/nvim/api/window.c2
-rw-r--r--src/nvim/autocmd.c2
-rw-r--r--src/nvim/change.c2
-rw-r--r--src/nvim/edit.c8
-rw-r--r--src/nvim/eval/funcs.c6
-rw-r--r--src/nvim/ex_docmd.c2
-rw-r--r--src/nvim/ex_getln.c2
-rw-r--r--src/nvim/os/pty_process_unix.c2
-rw-r--r--src/nvim/os/pty_process_win.c2
-rw-r--r--src/nvim/search.c2
-rw-r--r--src/nvim/terminal.c2
-rw-r--r--src/nvim/tui/input.c1
-rw-r--r--src/nvim/ui_client.c2
-rw-r--r--test/functional/terminal/channel_spec.lua4
19 files changed, 27 insertions, 24 deletions
diff --git a/runtime/doc/remote.txt b/runtime/doc/remote.txt
index b8991be738..0c1e3438de 100644
--- 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
index 7f12372502..1be40b0081 100644
--- 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
index 8d11b4621c..105e7c4621 100644
--- 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
index 8124b23eb1..3eb332279a 100644
--- 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
index 3292ee2ef8..0bdccf7a0b 100644
--- 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
index 9c473ff724..be43708604 100644
--- 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
index 8e4b043169..df336d8703 100644
--- 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
index 607414ac3c..6c3dbf72e4 100644
--- 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
index 095e082f61..2e36962a4d 100644
--- 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
index 738ed7f85e..5b0d6713e2 100644
--- 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
index 09cf6601ee..14d0c58cd1 100644
--- 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
index f52f3afe7d..aff356b6a5 100644
--- 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
index 58cb1b8f84..4a49c0b162 100644
--- 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
index ed9f4636e3..4fb9e30a96 100644
--- 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
index cc7c2ecf06..a69bd641f8 100644
--- 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
index a76a806b80..5189705a36 100644
--- 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
index b262fc6c54..26b3dd6e92 100644
--- 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
index 4fad3e0709..f11ed45e86 100644
--- 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
index 9059441fd9..b5f3c2bd31 100644
--- 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",