aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2022-11-29 02:45:48 +0100
committerGitHub <noreply@github.com>2022-11-29 09:45:48 +0800
commit615f124003376c007442319b31a172360796974c (patch)
tree15a19518bb30f32dab421930bbbfa4043b56ea54
parent0badfaa6d0a86904f67e1343e839c2f7966e4716 (diff)
downloadrneovim-615f124003376c007442319b31a172360796974c.tar.gz
rneovim-615f124003376c007442319b31a172360796974c.tar.bz2
rneovim-615f124003376c007442319b31a172360796974c.zip
docs: fix typos (#21196)
Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: Raphael <glephunter@gmail.com> Co-authored-by: Gregory Anders <greg@gpanders.com>
-rw-r--r--runtime/doc/api.txt2
-rw-r--r--runtime/doc/editing.txt2
-rw-r--r--runtime/doc/gui.txt4
-rw-r--r--runtime/doc/lsp.txt4
-rw-r--r--runtime/lua/vim/lsp/sync.lua2
-rw-r--r--runtime/lua/vim/lsp/util.lua2
-rw-r--r--src/nvim/api/vim.c2
-rw-r--r--src/nvim/getchar.c4
-rw-r--r--src/nvim/testdir/test_vimscript.vim2
-rw-r--r--test/functional/api/buffer_updates_spec.lua2
-rw-r--r--test/functional/api/proc_spec.lua10
-rw-r--r--test/functional/api/vim_spec.lua2
-rw-r--r--test/functional/core/fileio_spec.lua2
-rw-r--r--test/functional/lua/vim_spec.lua18
-rw-r--r--test/functional/ui/cmdline_highlight_spec.lua12
15 files changed, 36 insertions, 34 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt
index 9faff82f06..90dca81953 100644
--- a/runtime/doc/api.txt
+++ b/runtime/doc/api.txt
@@ -809,7 +809,7 @@ nvim_feedkeys({keys}, {mode}, {escape_ks}) *nvim_feedkeys()*
Parameters: ~
• {keys} to be typed
• {mode} behavior flags, see |feedkeys()|
- • {escape_ks} If true, escape K_SPECIAL bytes in `keys` This should be
+ • {escape_ks} If true, escape K_SPECIAL bytes in `keys`. This should be
false if you already used |nvim_replace_termcodes()|, and
true otherwise.
diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt
index e379d9eeb1..34650b88d4 100644
--- a/runtime/doc/editing.txt
+++ b/runtime/doc/editing.txt
@@ -1651,7 +1651,7 @@ There are three different types of searching:
with depth limiter (/usr/**2) or upward search (;) notations.
==============================================================================
-11. Trusted Files *trust*
+12. Trusted Files *trust*
Nvim has the ability to execute arbitrary code through the 'exrc' option. In
order to prevent executing code from untrusted sources, Nvim has the concept of
diff --git a/runtime/doc/gui.txt b/runtime/doc/gui.txt
index 8f09e5225f..1fda624fc6 100644
--- a/runtime/doc/gui.txt
+++ b/runtime/doc/gui.txt
@@ -450,8 +450,8 @@ The default "PopUp" menu is: >
anoremenu PopUp.Paste "+gP
vnoremenu PopUp.Paste "+P
vnoremenu PopUp.Delete "_x
- nnoremenu PopUp.Select\ All> ggVG
- vnoremenu PopUp.Select\ All> gg0oG$
+ nnoremenu PopUp.Select\ All ggVG
+ vnoremenu PopUp.Select\ All gg0oG$
inoremenu PopUp.Select\ All <C-Home><C-O>VG
anoremenu PopUp.-1- <Nop>
anoremenu PopUp.How-to\ disable\ mouse <Cmd>help disable-mouse<CR>
diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt
index 0255d78c4c..d9b944bfe2 100644
--- a/runtime/doc/lsp.txt
+++ b/runtime/doc/lsp.txt
@@ -1416,7 +1416,7 @@ buf_highlight_references({bufnr}, {references}, {offset_encoding})
• {offset_encoding} (string) One of "utf-8", "utf-16", "utf-32".
See also: ~
- https://microsoft.github.io/language-server-protocol/specifications/specification-3-17/#documentHighlight
+ https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocumentContentChangeEvent
*vim.lsp.util.character_offset()*
character_offset({buf}, {row}, {col}, {offset_encoding})
@@ -1952,7 +1952,7 @@ compute_diff({___MissingCloseParenHere___})
• {offset_encoding} (string) encoding requested by language server
Return: ~
- (table) TextDocumentContentChangeEvent see https://microsoft.github.io/language-server-protocol/specifications/specification-3-17/#textDocumentContentChangeEvent
+ (table) TextDocumentContentChangeEvent see https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocumentContentChangeEvent
==============================================================================
diff --git a/runtime/lua/vim/lsp/sync.lua b/runtime/lua/vim/lsp/sync.lua
index 0d65e86b55..826352f036 100644
--- a/runtime/lua/vim/lsp/sync.lua
+++ b/runtime/lua/vim/lsp/sync.lua
@@ -392,7 +392,7 @@ end
---@param lastline number line to begin search in old_lines for last difference
---@param new_lastline number line to begin search in new_lines for last difference
---@param offset_encoding string encoding requested by language server
----@returns table TextDocumentContentChangeEvent see https://microsoft.github.io/language-server-protocol/specifications/specification-3-17/#textDocumentContentChangeEvent
+---@returns table TextDocumentContentChangeEvent see https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocumentContentChangeEvent
function M.compute_diff(
prev_lines,
curr_lines,
diff --git a/runtime/lua/vim/lsp/util.lua b/runtime/lua/vim/lsp/util.lua
index d89757ef0c..ba9f145e01 100644
--- a/runtime/lua/vim/lsp/util.lua
+++ b/runtime/lua/vim/lsp/util.lua
@@ -1679,7 +1679,7 @@ do --[[ References ]]
---@param bufnr number Buffer id
---@param references table List of `DocumentHighlight` objects to highlight
---@param offset_encoding string One of "utf-8", "utf-16", "utf-32".
- ---@see https://microsoft.github.io/language-server-protocol/specifications/specification-3-17/#documentHighlight
+ ---@see https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocumentContentChangeEvent
function M.buf_highlight_references(bufnr, references, offset_encoding)
validate({
bufnr = { bufnr, 'n', true },
diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c
index 7a5ea7aa95..c3f71cc625 100644
--- a/src/nvim/api/vim.c
+++ b/src/nvim/api/vim.c
@@ -236,7 +236,7 @@ void nvim_set_hl_ns_fast(Integer ns_id, Error *err)
///
/// @param keys to be typed
/// @param mode behavior flags, see |feedkeys()|
-/// @param escape_ks If true, escape K_SPECIAL bytes in `keys`
+/// @param escape_ks If true, escape K_SPECIAL bytes in `keys`.
/// This should be false if you already used
/// |nvim_replace_termcodes()|, and true otherwise.
/// @see feedkeys()
diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c
index 680ef2f29b..fa4d2942f6 100644
--- a/src/nvim/getchar.c
+++ b/src/nvim/getchar.c
@@ -2342,7 +2342,9 @@ void check_end_reg_executing(bool advance)
static int vgetorpeek(bool advance)
{
int c, c1;
- bool timedout = false; // waited for more than 1 second for mapping to complete
+ bool timedout = false; // waited for more than 'timeoutlen'
+ // for mapping to complete or
+ // 'ttimeoutlen' for complete key code
int mapdepth = 0; // check for recursive mapping
bool mode_deleted = false; // set when mode has been deleted
int new_wcol, new_wrow;
diff --git a/src/nvim/testdir/test_vimscript.vim b/src/nvim/testdir/test_vimscript.vim
index c93ba9dcfc..aedc63ef00 100644
--- a/src/nvim/testdir/test_vimscript.vim
+++ b/src/nvim/testdir/test_vimscript.vim
@@ -6642,7 +6642,7 @@ func Test_invalid_function_names()
endtry
call assert_equal(1, caught_e884)
- " function name folowed by #
+ " function name followed by #
let caught_e128 = 0
try
func! test2() "#
diff --git a/test/functional/api/buffer_updates_spec.lua b/test/functional/api/buffer_updates_spec.lua
index 3d257e9477..d5f06c8f1f 100644
--- a/test/functional/api/buffer_updates_spec.lua
+++ b/test/functional/api/buffer_updates_spec.lua
@@ -810,7 +810,7 @@ describe('API: buffer events:', function()
local newlines = args[5]
-- Size of the contained nvim instance is 23 lines, this might change
- -- with the test setup. Note updates are continguous.
+ -- with the test setup. Note updates are contiguous.
assert(#newlines <= 23)
for i = 1,#newlines do
diff --git a/test/functional/api/proc_spec.lua b/test/functional/api/proc_spec.lua
index 3af1791e43..2028a8fba5 100644
--- a/test/functional/api/proc_spec.lua
+++ b/test/functional/api/proc_spec.lua
@@ -19,26 +19,26 @@ describe('API', function()
-- Might be non-zero already (left-over from some other test?),
-- but this is not what is tested here.
- local initial_childs = request('nvim_get_proc_children', this_pid)
+ local initial_children = request('nvim_get_proc_children', this_pid)
local job1 = funcs.jobstart(nvim_argv)
retry(nil, nil, function()
- eq(#initial_childs + 1, #request('nvim_get_proc_children', this_pid))
+ eq(#initial_children + 1, #request('nvim_get_proc_children', this_pid))
end)
local job2 = funcs.jobstart(nvim_argv)
retry(nil, nil, function()
- eq(#initial_childs + 2, #request('nvim_get_proc_children', this_pid))
+ eq(#initial_children + 2, #request('nvim_get_proc_children', this_pid))
end)
funcs.jobstop(job1)
retry(nil, nil, function()
- eq(#initial_childs + 1, #request('nvim_get_proc_children', this_pid))
+ eq(#initial_children + 1, #request('nvim_get_proc_children', this_pid))
end)
funcs.jobstop(job2)
retry(nil, nil, function()
- eq(#initial_childs, #request('nvim_get_proc_children', this_pid))
+ eq(#initial_children, #request('nvim_get_proc_children', this_pid))
end)
end)
diff --git a/test/functional/api/vim_spec.lua b/test/functional/api/vim_spec.lua
index 3e1aab28ce..5677990525 100644
--- a/test/functional/api/vim_spec.lua
+++ b/test/functional/api/vim_spec.lua
@@ -3042,7 +3042,7 @@ describe('API', function()
meths.buf_set_mark(buf, 'F', 2, 2, {})
meths.buf_set_name(buf, "mybuf")
local mark = meths.get_mark('F', {})
- -- Compare the path tail ony
+ -- Compare the path tail only
assert(string.find(mark[4], "mybuf$"))
eq({2, 2, buf.id, mark[4]}, mark)
end)
diff --git a/test/functional/core/fileio_spec.lua b/test/functional/core/fileio_spec.lua
index 51189b7c32..ed37032f25 100644
--- a/test/functional/core/fileio_spec.lua
+++ b/test/functional/core/fileio_spec.lua
@@ -153,7 +153,7 @@ describe('fileio', function()
end)
- it('backup symlinked files in first avialable backupdir #11349', function()
+ it('backup symlinked files in first available backupdir #11349', function()
skip(is_ci('cirrus'))
clear()
diff --git a/test/functional/lua/vim_spec.lua b/test/functional/lua/vim_spec.lua
index 21f2c19fbb..4266d30e73 100644
--- a/test/functional/lua/vim_spec.lua
+++ b/test/functional/lua/vim_spec.lua
@@ -160,25 +160,25 @@ describe('lua stdlib', function()
it("vim.str_utfindex/str_byteindex", function()
exec_lua([[_G.test_text = "xy åäö ɧ 汉语 ↥ 🤦x🦄 å بِيَّ\000ъ"]])
- local indicies32 = {[0]=0,1,2,3,5,7,9,10,12,13,16,19,20,23,24,28,29,33,34,35,37,38,40,42,44,46,48,49,51}
- local indicies16 = {[0]=0,1,2,3,5,7,9,10,12,13,16,19,20,23,24,28,28,29,33,33,34,35,37,38,40,42,44,46,48,49,51}
- for i,k in pairs(indicies32) do
+ local indices32 = {[0]=0,1,2,3,5,7,9,10,12,13,16,19,20,23,24,28,29,33,34,35,37,38,40,42,44,46,48,49,51}
+ local indices16 = {[0]=0,1,2,3,5,7,9,10,12,13,16,19,20,23,24,28,28,29,33,33,34,35,37,38,40,42,44,46,48,49,51}
+ for i,k in pairs(indices32) do
eq(k, exec_lua("return vim.str_byteindex(_G.test_text, ...)", i), i)
end
- for i,k in pairs(indicies16) do
+ for i,k in pairs(indices16) do
eq(k, exec_lua("return vim.str_byteindex(_G.test_text, ..., true)", i), i)
end
- eq("index out of range", pcall_err(exec_lua, "return vim.str_byteindex(_G.test_text, ...)", #indicies32 + 1))
- eq("index out of range", pcall_err(exec_lua, "return vim.str_byteindex(_G.test_text, ..., true)", #indicies16 + 1))
+ eq("index out of range", pcall_err(exec_lua, "return vim.str_byteindex(_G.test_text, ...)", #indices32 + 1))
+ eq("index out of range", pcall_err(exec_lua, "return vim.str_byteindex(_G.test_text, ..., true)", #indices16 + 1))
local i32, i16 = 0, 0
local len = 51
for k = 0,len do
- if indicies32[i32] < k then
+ if indices32[i32] < k then
i32 = i32 + 1
end
- if indicies16[i16] < k then
+ if indices16[i16] < k then
i16 = i16 + 1
- if indicies16[i16+1] == indicies16[i16] then
+ if indices16[i16+1] == indices16[i16] then
i16 = i16 + 1
end
end
diff --git a/test/functional/ui/cmdline_highlight_spec.lua b/test/functional/ui/cmdline_highlight_spec.lua
index fa5771a8b3..33e375760e 100644
--- a/test/functional/ui/cmdline_highlight_spec.lua
+++ b/test/functional/ui/cmdline_highlight_spec.lua
@@ -61,7 +61,7 @@ before_each(function()
endwhile
return ret
endfunction
- function SplittedMultibyteStart(cmdline)
+ function SplitMultibyteStart(cmdline)
let ret = []
let i = 0
while i < len(a:cmdline)
@@ -77,7 +77,7 @@ before_each(function()
endwhile
return ret
endfunction
- function SplittedMultibyteEnd(cmdline)
+ function SplitMultibyteEnd(cmdline)
let ret = []
let i = 0
while i < len(a:cmdline)
@@ -296,7 +296,7 @@ describe('Command-line coloring', function()
end
it('does the right thing when hl start appears to split multibyte char',
function()
- set_color_cb('SplittedMultibyteStart')
+ set_color_cb('SplitMultibyteStart')
start_prompt('echo "«')
screen:expect{grid=[[
|
@@ -322,7 +322,7 @@ describe('Command-line coloring', function()
end)
it('does the right thing when hl end appears to split multibyte char',
function()
- set_color_cb('SplittedMultibyteEnd')
+ set_color_cb('SplitMultibyteEnd')
start_prompt('echo "«')
screen:expect([[
|
@@ -409,7 +409,7 @@ describe('Command-line coloring', function()
]])
end)
it('stops executing callback after a number of errors', function()
- set_color_cb('SplittedMultibyteStart')
+ set_color_cb('SplitMultibyteStart')
start_prompt('let x = "«»«»«»«»«»"')
screen:expect([[
|
@@ -772,7 +772,7 @@ describe('Ex commands coloring', function()
]])
end)
it('still executes command-line even if errored out', function()
- meths.set_var('Nvim_color_cmdline', 'SplittedMultibyteStart')
+ meths.set_var('Nvim_color_cmdline', 'SplitMultibyteStart')
feed(':let x = "«"\n')
eq('«', meths.get_var('x'))
local msg = 'E5405: Chunk 0 start 10 splits multibyte character'