aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordundargoc <gocdundar@gmail.com>2022-10-23 10:17:45 +0200
committerzeertzjq <zeertzjq@outlook.com>2022-11-02 21:45:26 +0800
commit4716a578ae0c3516d685495bb55e40c939a4ac87 (patch)
treeee2734f0fe4e4d91f4f163ba99f64ce992948af9
parent44b88d8c310e778c55ef1f7a270d2651266054ca (diff)
downloadrneovim-4716a578ae0c3516d685495bb55e40c939a4ac87.tar.gz
rneovim-4716a578ae0c3516d685495bb55e40c939a4ac87.tar.bz2
rneovim-4716a578ae0c3516d685495bb55e40c939a4ac87.zip
docs: fix typos
-rw-r--r--runtime/doc/repeat.txt2
-rw-r--r--scripts/lua2dox.lua4
-rwxr-xr-xscripts/pvscheck.sh2
-rw-r--r--src/nvim/README.md4
-rw-r--r--src/nvim/eval.c6
-rw-r--r--src/nvim/eval/userfunc.c2
-rw-r--r--src/nvim/ex_docmd.c2
-rw-r--r--src/nvim/mapping.c2
-rw-r--r--src/nvim/ops.c2
-rw-r--r--src/nvim/options.lua2
-rw-r--r--src/nvim/runtime.c2
-rw-r--r--src/nvim/shada.c18
-rw-r--r--src/nvim/spell.c4
-rw-r--r--src/nvim/spellfile.c2
-rw-r--r--src/nvim/testdir/test_options.vim2
-rw-r--r--src/nvim/testdir/test_vimscript.vim2
-rw-r--r--src/nvim/testdir/test_window_cmd.vim2
-rw-r--r--src/nvim/usercmd.c4
-rw-r--r--test/functional/api/keymap_spec.lua2
-rw-r--r--test/functional/core/startup_spec.lua2
-rw-r--r--test/functional/ex_cmds/verbose_spec.lua4
-rw-r--r--test/functional/legacy/increment_spec.lua2
-rw-r--r--test/functional/plugin/lsp_spec.lua4
-rw-r--r--test/functional/ui/sign_spec.lua2
24 files changed, 40 insertions, 40 deletions
diff --git a/runtime/doc/repeat.txt b/runtime/doc/repeat.txt
index 6a1b8b05a7..1bbd20702b 100644
--- a/runtime/doc/repeat.txt
+++ b/runtime/doc/repeat.txt
@@ -689,7 +689,7 @@ found automatically. Your package would have these files:
< pack/foo/start/lib/autoload/foolib.vim >
func foolib#getit()
-This works, because start packages will be searchd for autoload files, when
+This works, because start packages will be searched for autoload files, when
sourcing the plugins.
==============================================================================
diff --git a/scripts/lua2dox.lua b/scripts/lua2dox.lua
index 86afe97a7e..83bf213f40 100644
--- a/scripts/lua2dox.lua
+++ b/scripts/lua2dox.lua
@@ -497,14 +497,14 @@ function TLua2DoX_filter.readfile(this, AppStamp, Filename)
else
this:warning(inStream:getLineNo(), 'something weird here')
end
- fn_magic = nil -- mustn't indavertently use it again
+ fn_magic = nil -- mustn't inadvertently use it again
-- TODO: If we can make this learn how to generate these, that would be helpful.
-- elseif string.find(line, "^M%['.*'%] = function") then
-- state = 'in_function' -- it's a function
-- outStream:writeln("function textDocument/publishDiagnostics(...){}")
- -- fn_magic = nil -- mustn't indavertently use it again
+ -- fn_magic = nil -- mustn't inadvertently use it again
else
state = '' -- unknown
if #line > 0 then -- we don't know what this line means, so just comment it out
diff --git a/scripts/pvscheck.sh b/scripts/pvscheck.sh
index 610c20eb48..97757c0848 100755
--- a/scripts/pvscheck.sh
+++ b/scripts/pvscheck.sh
@@ -328,7 +328,7 @@ realdir() {(
patch_sources() {(
local tgt="$1" ; shift
- local only_bulid="${1}" ; shift
+ local only_build="${1}" ; shift
get_pvs_comment "$tgt"
diff --git a/src/nvim/README.md b/src/nvim/README.md
index 91fb3ca2f6..e710c3ef58 100644
--- a/src/nvim/README.md
+++ b/src/nvim/README.md
@@ -391,8 +391,8 @@ implemented by libuv, the platform layer used by Nvim.
Since Nvim inherited its code from Vim, the states are not prepared to receive
"arbitrary events", so we use a special key to represent those (When a state
-receives an "arbitrary event", it normally doesn't do anything other update the
-screen).
+receives an "arbitrary event", it normally doesn't do anything other than
+update the screen).
Main loop
---------
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index 89ae4a2cd0..bc669a3e11 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -3051,7 +3051,7 @@ static int eval7(char **arg, typval_T *rettv, int evaluate, int want_string)
case '#':
if ((*arg)[1] == '{') {
(*arg)++;
- ret = dict_get_tv(arg, rettv, evaluate, true);
+ ret = eval_dict(arg, rettv, evaluate, true);
} else {
ret = NOTDONE;
}
@@ -3062,7 +3062,7 @@ static int eval7(char **arg, typval_T *rettv, int evaluate, int want_string)
case '{':
ret = get_lambda_tv(arg, rettv, evaluate);
if (ret == NOTDONE) {
- ret = dict_get_tv(arg, rettv, evaluate, false);
+ ret = eval_dict(arg, rettv, evaluate, false);
}
break;
@@ -4595,7 +4595,7 @@ static int get_literal_key(char **arg, typval_T *tv)
/// "literal" is true for #{key: val}
///
/// @return OK or FAIL. Returns NOTDONE for {expr}.
-static int dict_get_tv(char **arg, typval_T *rettv, int evaluate, bool literal)
+static int eval_dict(char **arg, typval_T *rettv, int evaluate, bool literal)
{
typval_T tv;
char *key = NULL;
diff --git a/src/nvim/eval/userfunc.c b/src/nvim/eval/userfunc.c
index c22718c65d..71f33fe465 100644
--- a/src/nvim/eval/userfunc.c
+++ b/src/nvim/eval/userfunc.c
@@ -460,7 +460,7 @@ int get_func_tv(const char_u *name, int len, typval_T *rettv, char **arg, funcex
int i = 0;
if (get_vim_var_nr(VV_TESTING)) {
- // Prepare for calling garbagecollect_for_testing(), need to know
+ // Prepare for calling test_garbagecollect_now(), need to know
// what variables are used on the call stack.
if (funcargs.ga_itemsize == 0) {
ga_init(&funcargs, (int)sizeof(typval_T *), 50);
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index e867bd57d4..d1a1b496f4 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -5212,7 +5212,7 @@ void do_exedit(exarg_T *eap, win_T *old_curwin)
old_curwin == NULL ? curwin : NULL);
} else if ((eap->cmdidx != CMD_split && eap->cmdidx != CMD_vsplit)
|| *eap->arg != NUL) {
- // Can't edit another file when "curbuf->b_ro_lockec" is set. Only ":edit"
+ // Can't edit another file when "curbuf->b_ro_locked" is set. Only ":edit"
// can bring us here, others are stopped earlier.
if (*eap->arg != NUL && curbuf_locked()) {
return;
diff --git a/src/nvim/mapping.c b/src/nvim/mapping.c
index 2b42d7725b..0fff48019b 100644
--- a/src/nvim/mapping.c
+++ b/src/nvim/mapping.c
@@ -176,7 +176,7 @@ static void showmap(mapblock_T *mp, bool local)
// Display the LHS. Get length of what we write.
len = (size_t)msg_outtrans_special((char *)mp->m_keys, true, 0);
do {
- msg_putchar(' '); // padd with blanks
+ msg_putchar(' '); // pad with blanks
len++;
} while (len < 12);
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index 7f8a5b6f2e..2d53918ded 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -3272,7 +3272,7 @@ void do_put(int regname, yankreg_T *reg, int dir, long count, int flags)
shortline = (vcol < col) || (vcol == col && !*ptr);
- if (vcol < col) { // line too short, padd with spaces
+ if (vcol < col) { // line too short, pad with spaces
bd.startspaces = col - vcol;
} else if (vcol > col) {
bd.endspaces = vcol - col;
diff --git a/src/nvim/options.lua b/src/nvim/options.lua
index 088aa40fda..3a59becb33 100644
--- a/src/nvim/options.lua
+++ b/src/nvim/options.lua
@@ -19,7 +19,7 @@
-- types: bool, number, string
-- lists: (nil), comma, onecomma, flags, flagscomma
-- scopes: global, buffer, window
--- redraw options: statuslines, tabline, current_window, curent_window_only,
+-- redraw options: statuslines, tabline, current_window, current_window_only,
-- current_buffer, all_windows, curswant
-- defaults: {condition=#if condition, if_true=default, if_false=default}
-- #if condition:
diff --git a/src/nvim/runtime.c b/src/nvim/runtime.c
index fa7aa35a4d..6becd50910 100644
--- a/src/nvim/runtime.c
+++ b/src/nvim/runtime.c
@@ -1633,7 +1633,7 @@ void ex_options(exarg_T *eap)
bool multi_mods = 0;
buf[0] = NUL;
- (void)add_win_cmd_modifers(buf, &cmdmod, &multi_mods);
+ (void)add_win_cmd_modifiers(buf, &cmdmod, &multi_mods);
os_setenv("OPTWIN_CMD", buf, 1);
cmd_source(SYS_OPTWIN_FILE, NULL);
diff --git a/src/nvim/shada.c b/src/nvim/shada.c
index 7830dd5206..40b3429de9 100644
--- a/src/nvim/shada.c
+++ b/src/nvim/shada.c
@@ -166,7 +166,7 @@ typedef enum {
/// Possible results of shada_write function.
typedef enum {
- kSDWriteSuccessfull, ///< Writing was successful.
+ kSDWriteSuccessful, ///< Writing was successful.
kSDWriteReadNotShada, ///< Writing was successful, but when reading it
///< attempted to read file that did not look like
///< a ShaDa file.
@@ -1511,7 +1511,7 @@ static char *shada_filename(const char *file)
/// @param[in] max_kbyte Maximum size of an item in KiB. Zero means no
/// restrictions.
///
-/// @return kSDWriteSuccessfull, kSDWriteFailed or kSDWriteIgnError.
+/// @return kSDWriteSuccessful, kSDWriteFailed or kSDWriteIgnError.
static ShaDaWriteResult shada_pack_entry(msgpack_packer *const packer, ShadaEntry entry,
const size_t max_kbyte)
FUNC_ATTR_NONNULL_ALL
@@ -1819,7 +1819,7 @@ static ShaDaWriteResult shada_pack_entry(msgpack_packer *const packer, ShadaEntr
}
msgpack_packer_free(spacker);
msgpack_sbuffer_destroy(&sbuf);
- return kSDWriteSuccessfull;
+ return kSDWriteSuccessful;
shada_pack_entry_error:
msgpack_packer_free(spacker);
msgpack_sbuffer_destroy(&sbuf);
@@ -1839,7 +1839,7 @@ static inline ShaDaWriteResult shada_pack_pfreed_entry(msgpack_packer *const pac
const size_t max_kbyte)
FUNC_ATTR_NONNULL_ALL FUNC_ATTR_ALWAYS_INLINE
{
- ShaDaWriteResult ret = kSDWriteSuccessfull;
+ ShaDaWriteResult ret = kSDWriteSuccessful;
ret = shada_pack_entry(packer, entry.data, max_kbyte);
if (entry.can_free_entry) {
shada_free_shada_entry(&entry.data);
@@ -2053,7 +2053,7 @@ static inline ShaDaWriteResult shada_read_when_writing(ShaDaReadDef *const sd_re
msgpack_packer *const packer)
FUNC_ATTR_NONNULL_ALL FUNC_ATTR_WARN_UNUSED_RESULT
{
- ShaDaWriteResult ret = kSDWriteSuccessfull;
+ ShaDaWriteResult ret = kSDWriteSuccessful;
ShadaEntry entry;
ShaDaReadResult srni_ret;
@@ -2492,7 +2492,7 @@ static int hist_type2char(const int type)
static ShaDaWriteResult shada_write(ShaDaWriteDef *const sd_writer, ShaDaReadDef *const sd_reader)
FUNC_ATTR_NONNULL_ARG(1)
{
- ShaDaWriteResult ret = kSDWriteSuccessfull;
+ ShaDaWriteResult ret = kSDWriteSuccessful;
int max_kbyte_i = get_shada_parameter('s');
if (max_kbyte_i < 0) {
max_kbyte_i = 10;
@@ -2652,7 +2652,7 @@ static ShaDaWriteResult shada_write(ShaDaWriteDef *const sd_writer, ShaDaReadDef
}
tv_clear(&vartv);
tv_clear(&tgttv);
- if (spe_ret == kSDWriteSuccessfull) {
+ if (spe_ret == kSDWriteSuccessful) {
int kh_ret;
(void)kh_put(strset, &wms->dumped_variables, name, &kh_ret);
}
@@ -2817,7 +2817,7 @@ static ShaDaWriteResult shada_write(ShaDaWriteDef *const sd_writer, ShaDaReadDef
if (sd_reader != NULL) {
const ShaDaWriteResult srww_ret = shada_read_when_writing(sd_reader, srni_flags, max_kbyte, wms,
packer);
- if (srww_ret != kSDWriteSuccessfull) {
+ if (srww_ret != kSDWriteSuccessful) {
ret = srww_ret;
}
}
@@ -3078,7 +3078,7 @@ shada_write_file_nomerge: {}
if (!nomerge) {
sd_reader.close(&sd_reader);
bool did_remove = false;
- if (sw_ret == kSDWriteSuccessfull) {
+ if (sw_ret == kSDWriteSuccessful) {
#ifdef UNIX
// For Unix we check the owner of the file. It's not very nice to
// overwrite a user’s viminfo file after a "su root", with a
diff --git a/src/nvim/spell.c b/src/nvim/spell.c
index 1bd0b9c85f..e76ac49b5d 100644
--- a/src/nvim/spell.c
+++ b/src/nvim/spell.c
@@ -50,7 +50,7 @@
// Use SPELL_PRINTTREE for debugging: dump the word tree after adding a word.
// Only use it for small word lists!
-// Use SPELL_COMPRESS_ALLWAYS for debugging: compress the word tree after
+// Use SPELL_COMPRESS_ALWAYS for debugging: compress the word tree after
// adding a word. Only use it for small word lists!
// Use DEBUG_TRIEWALK to print the changes made in suggest_trie_walk() for a
@@ -160,7 +160,7 @@ typedef struct matchinf_S {
win_T *mi_win; // buffer being checked
// for NOBREAK
- int mi_result2; // "mi_resul" without following word
+ int mi_result2; // "mi_result" without following word
char_u *mi_end2; // "mi_end" without following word
} matchinf_T;
diff --git a/src/nvim/spellfile.c b/src/nvim/spellfile.c
index d5fbbaff1f..7837f242b5 100644
--- a/src/nvim/spellfile.c
+++ b/src/nvim/spellfile.c
@@ -4089,7 +4089,7 @@ static int tree_add_word(spellinfo_T *spin, const char_u *word, wordnode_T *root
// 3. When compressed before, added "compress_added" words
// (si_compress_cnt == 1) and the number of free nodes drops below the
// maximum word length.
-#ifndef SPELL_COMPRESS_ALLWAYS
+#ifndef SPELL_COMPRESS_ALWAYS
if (spin->si_compress_cnt == 1 // NOLINT(readability/braces)
? spin->si_free_count < MAXWLEN
: spin->si_blocks_cnt >= compress_start)
diff --git a/src/nvim/testdir/test_options.vim b/src/nvim/testdir/test_options.vim
index 2836e81c4a..3916d7c554 100644
--- a/src/nvim/testdir/test_options.vim
+++ b/src/nvim/testdir/test_options.vim
@@ -263,7 +263,7 @@ func Test_set_completion()
call feedkeys(":setglobal di\<C-A>\<C-B>\"\<CR>", 'tx')
call assert_equal('"setglobal dictionary diff diffexpr diffopt digraph directory display', @:)
- " Expand boolan options. When doing :set no<Tab>
+ " Expand boolean options. When doing :set no<Tab>
" vim displays the options names without "no" but completion uses "no...".
call feedkeys(":set nodi\<C-A>\<C-B>\"\<CR>", 'tx')
call assert_equal('"set nodiff digraph', @:)
diff --git a/src/nvim/testdir/test_vimscript.vim b/src/nvim/testdir/test_vimscript.vim
index f20fd12ed3..bd60dcb707 100644
--- a/src/nvim/testdir/test_vimscript.vim
+++ b/src/nvim/testdir/test_vimscript.vim
@@ -1443,7 +1443,7 @@ endfunc
" Undefined behavior was detected by ubsan with line continuation
" after an empty line.
"-------------------------------------------------------------------------------
-func Test_script_emty_line_continuation()
+func Test_script_empty_line_continuation()
\
endfunc
diff --git a/src/nvim/testdir/test_window_cmd.vim b/src/nvim/testdir/test_window_cmd.vim
index f38eaaf318..909db3a1bb 100644
--- a/src/nvim/testdir/test_window_cmd.vim
+++ b/src/nvim/testdir/test_window_cmd.vim
@@ -1214,7 +1214,7 @@ endfunc
" Test for jumping to a vertical/horizontal neighbor window based on the
" current cursor position
-func Test_window_goto_neightbor()
+func Test_window_goto_neighbor()
%bw!
" Vertical window movement
diff --git a/src/nvim/usercmd.c b/src/nvim/usercmd.c
index 408cdc93a7..bed4d55d4e 100644
--- a/src/nvim/usercmd.c
+++ b/src/nvim/usercmd.c
@@ -1215,7 +1215,7 @@ static size_t add_cmd_modifier(char *buf, char *mod_str, bool *multi_mods)
/// was added.
///
/// @return the number of bytes added
-size_t add_win_cmd_modifers(char *buf, const cmdmod_T *cmod, bool *multi_mods)
+size_t add_win_cmd_modifiers(char *buf, const cmdmod_T *cmod, bool *multi_mods)
{
size_t result = 0;
@@ -1320,7 +1320,7 @@ size_t uc_mods(char *buf, const cmdmod_T *cmod, bool quote)
}
}
// flags from cmod->cmod_split
- result += add_win_cmd_modifers(buf, cmod, &multi_mods);
+ result += add_win_cmd_modifiers(buf, cmod, &multi_mods);
if (quote && buf != NULL) {
buf += result - 2;
diff --git a/test/functional/api/keymap_spec.lua b/test/functional/api/keymap_spec.lua
index 30c351b26a..5be4425162 100644
--- a/test/functional/api/keymap_spec.lua
+++ b/test/functional/api/keymap_spec.lua
@@ -1066,7 +1066,7 @@ describe('nvim_buf_set_keymap, nvim_buf_del_keymap', function()
eq({'rhs'}, bufmeths.get_lines(0, 0, 1, 1))
end)
- it("does not crash when setting keymap in a non-existing buffer #13541", function()
+ it("does not crash when setting mapping in a non-existing buffer #13541", function()
pcall_err(bufmeths.set_keymap, 100, '', 'lsh', 'irhs<Esc>', {})
helpers.assert_alive()
end)
diff --git a/test/functional/core/startup_spec.lua b/test/functional/core/startup_spec.lua
index a32c801c97..2084d365a5 100644
--- a/test/functional/core/startup_spec.lua
+++ b/test/functional/core/startup_spec.lua
@@ -637,7 +637,7 @@ describe('runtime:', function()
end)
it('loads plugin/*.lua from start packages', function()
- local plugin_path = table.concat({xconfig, 'nvim', 'pack', 'catagory',
+ local plugin_path = table.concat({xconfig, 'nvim', 'pack', 'category',
'start', 'test_plugin'}, pathsep)
local plugin_folder_path = table.concat({plugin_path, 'plugin'}, pathsep)
local plugin_file_path = table.concat({plugin_folder_path, 'plugin.lua'},
diff --git a/test/functional/ex_cmds/verbose_spec.lua b/test/functional/ex_cmds/verbose_spec.lua
index e6f67ef18e..000e746f1c 100644
--- a/test/functional/ex_cmds/verbose_spec.lua
+++ b/test/functional/ex_cmds/verbose_spec.lua
@@ -77,7 +77,7 @@ nohlsearch
script_location), result)
end)
- it('"Last set" for keymap set by Lua', function()
+ it('"Last set" for mapping set by Lua', function()
local result = exec_capture(':verbose map <leader>key1')
eq(string.format([[
@@ -86,7 +86,7 @@ n \key1 * :echo "test"<CR>
script_location), result)
end)
- it('"Last set" for keymap set by vim.keymap', function()
+ it('"Last set" for mapping set by vim.keymap', function()
local result = exec_capture(':verbose map <leader>key2')
eq(string.format([[
diff --git a/test/functional/legacy/increment_spec.lua b/test/functional/legacy/increment_spec.lua
index d51f9a2e02..d35f4bdae6 100644
--- a/test/functional/legacy/increment_spec.lua
+++ b/test/functional/legacy/increment_spec.lua
@@ -285,7 +285,7 @@ describe('Ctrl-A/Ctrl-X on visual selections', function()
" 1
" 1
" 1
- " Expexted:
+ " Expected:
" 1) g Ctrl-A on block selected indented lines
" 2
" 1
diff --git a/test/functional/plugin/lsp_spec.lua b/test/functional/plugin/lsp_spec.lua
index 425427be54..a7094fff48 100644
--- a/test/functional/plugin/lsp_spec.lua
+++ b/test/functional/plugin/lsp_spec.lua
@@ -2470,7 +2470,7 @@ describe('LSP', function()
},
uri = "file:///test_a"
},
- contanerName = "TestAContainer"
+ containerName = "TestAContainer"
},
{
deprecated = false,
@@ -2489,7 +2489,7 @@ describe('LSP', function()
},
uri = "file:///test_b"
},
- contanerName = "TestBContainer"
+ containerName = "TestBContainer"
}
}
return vim.lsp.util.symbols_to_items(sym_info, nil)
diff --git a/test/functional/ui/sign_spec.lua b/test/functional/ui/sign_spec.lua
index ff3e143126..a1683a32c9 100644
--- a/test/functional/ui/sign_spec.lua
+++ b/test/functional/ui/sign_spec.lua
@@ -158,7 +158,7 @@ describe('Signs', function()
]])
end)
- it('higlights the cursorline sign with culhl', function()
+ it('highlights the cursorline sign with culhl', function()
feed('ia<cr>b<cr>c<esc>')
command('sign define piet text=>> texthl=Search culhl=ErrorMsg')
command('sign place 1 line=1 name=piet buffer=1')