docs: fix typos (#20724)

Co-authored-by: Marco Lehmann <m99@posteo.de>
This commit is contained in:
dundargoc
2022-10-23 03:45:39 +02:00
committed by GitHub
parent d70193c326
commit 1887d8d7d0
13 changed files with 25 additions and 25 deletions

View File

@@ -827,7 +827,7 @@ Short explanation of each option: *option-list*
'printmbcharset' 'pmbcs' CJK character set to be used for :hardcopy 'printmbcharset' 'pmbcs' CJK character set to be used for :hardcopy
'printmbfont' 'pmbfn' font names to be used for CJK output of :hardcopy 'printmbfont' 'pmbfn' font names to be used for CJK output of :hardcopy
'printoptions' 'popt' controls the format of :hardcopy output 'printoptions' 'popt' controls the format of :hardcopy output
'pumheight' 'ph' maximum height of the popup menu 'pumheight' 'ph' maximum number of items to show in the popup menu
'pumwidth' 'pw' minimum width of the popup menu 'pumwidth' 'pw' minimum width of the popup menu
'pyxversion' 'pyx' Python version used for pyx* commands 'pyxversion' 'pyx' Python version used for pyx* commands
'quoteescape' 'qe' escape characters used in a string 'quoteescape' 'qe' escape characters used in a string

View File

@@ -1685,7 +1685,7 @@ Array nvim_call_atomic(uint64_t channel_id, Array calls, Arena *arena, Error *er
// error handled after loop // error handled after loop
break; break;
} }
// TODO(bfredl): wastefull copy. It could be avoided to encoding to msgpack // TODO(bfredl): wasteful copy. It could be avoided to encoding to msgpack
// directly here. But `result` might become invalid when next api function // directly here. But `result` might become invalid when next api function
// is called in the loop. // is called in the loop.
ADD_C(results, copy_object(result, arena)); ADD_C(results, copy_object(result, arena));

View File

@@ -2351,7 +2351,7 @@ static void expand_shellcmd(char *filepat, int *num_file, char ***file, int flag
} }
// Go over all directories in $PATH. Expand matches in that directory and // Go over all directories in $PATH. Expand matches in that directory and
// collect them in "ga". When "." is not in $PATH also expaned for the // collect them in "ga". When "." is not in $PATH also expand for the
// current directory, to find "subdir/cmd". // current directory, to find "subdir/cmd".
ga_init(&ga, (int)sizeof(char *), 10); ga_init(&ga, (int)sizeof(char *), 10);
hashtab_T found_ht; hashtab_T found_ht;

View File

@@ -62,7 +62,7 @@
#define EX_FLAGS 0x200000u // allow flags after count in argument #define EX_FLAGS 0x200000u // allow flags after count in argument
#define EX_LOCK_OK 0x1000000u // command can be executed when textlock is #define EX_LOCK_OK 0x1000000u // command can be executed when textlock is
// set; when missing disallows editing another // set; when missing disallows editing another
// buffer when current buffer is locked // buffer when curbuf->b_ro_locked is set
#define EX_KEEPSCRIPT 0x4000000u // keep sctx of where command was invoked #define EX_KEEPSCRIPT 0x4000000u // keep sctx of where command was invoked
#define EX_PREVIEW 0x8000000u // allow incremental command preview #define EX_PREVIEW 0x8000000u // allow incremental command preview
#define EX_FILES (EX_XFILE | EX_EXTRA) // multiple extra files allowed #define EX_FILES (EX_XFILE | EX_EXTRA) // multiple extra files allowed

View File

@@ -550,7 +550,7 @@ func Test_argdo()
bwipe Xa.c Xb.c Xc.c bwipe Xa.c Xb.c Xc.c
endfunc endfunc
" Test for quiting Vim with unedited files in the argument list " Test for quitting Vim with unedited files in the argument list
func Test_quit_with_arglist() func Test_quit_with_arglist()
if !CanRunVimInTerminal() if !CanRunVimInTerminal()
throw 'Skipped: cannot run vim in terminal' throw 'Skipped: cannot run vim in terminal'

View File

@@ -52,7 +52,7 @@ func Test_langmap()
set langmap=RL set langmap=RL
let g:counter = 0 let g:counter = 0
nnoremap L;L <Cmd>let g:counter += 1<CR> nnoremap L;L <Cmd>let g:counter += 1<CR>
nnoremap <C-L> <Cmd>throw 'This mapping shoud not be triggered'<CR> nnoremap <C-L> <Cmd>throw 'This mapping should not be triggered'<CR>
" 'langmap' is applied to keys without modifiers when matching a mapping " 'langmap' is applied to keys without modifiers when matching a mapping
call feedkeys('R;R', 'tx') call feedkeys('R;R', 'tx')

View File

@@ -429,7 +429,7 @@ func Test_menu_special()
nunmenu Test.Sign nunmenu Test.Sign
endfunc endfunc
" Test for "icon=filname" in a toolbar " Test for "icon=filename" in a toolbar
func Test_menu_icon() func Test_menu_icon()
CheckFeature toolbar CheckFeature toolbar
nmenu icon=myicon.xpm Toolbar.Foo :echo "Foo"<CR> nmenu icon=myicon.xpm Toolbar.Foo :echo "Foo"<CR>

View File

@@ -3251,7 +3251,7 @@ func Test_cclose_in_autocmd()
" call test_override('starting', 0) " call test_override('starting', 0)
endfunc endfunc
" Check that ":file" without an argument is possible even when curbuf is locked " Check that ":file" without an argument is possible even when "curbuf->b_ro_locked"
" is set. " is set.
func Test_file_from_copen() func Test_file_from_copen()
" Works without argument. " Works without argument.

View File

@@ -97,7 +97,7 @@ func Test_vartabs()
.retab! .retab!
call assert_equal("\t\t\t\tl", getline(1)) call assert_equal("\t\t\t\tl", getline(1))
" Test for 'retab' with same vlaues as vts " Test for 'retab' with same values as vts
set ts=8 sts=0 vts=5,3,6,2 vsts= set ts=8 sts=0 vts=5,3,6,2 vsts=
exe "norm! S l" exe "norm! S l"
.retab! 5,3,6,2 .retab! 5,3,6,2

View File

@@ -1281,7 +1281,7 @@ func Test_visual_block_with_virtualedit()
endfunc endfunc
func Test_visual_block_ctrl_w_f() func Test_visual_block_ctrl_w_f()
" Emtpy block selected in new buffer should not result in an error. " Empty block selected in new buffer should not result in an error.
au! BufNew foo sil norm f au! BufNew foo sil norm f
edit foo edit foo

View File

@@ -357,7 +357,7 @@ typedef struct {
int arg_len; int arg_len;
} ExprASTError; } ExprASTError;
/// Structure representing complety AST for one expression /// Structure representing complete AST for one expression
typedef struct { typedef struct {
/// When AST is not correct this message will be printed. /// When AST is not correct this message will be printed.
/// ///

View File

@@ -1016,11 +1016,11 @@ describe('lua stdlib', function()
eq('hi', funcs.luaeval "vim.g.testing") eq('hi', funcs.luaeval "vim.g.testing")
eq(123, funcs.luaeval "vim.g.other") eq(123, funcs.luaeval "vim.g.other")
eq(5120.1, funcs.luaeval "vim.g.floaty") eq(5120.1, funcs.luaeval "vim.g.floaty")
eq(NIL, funcs.luaeval "vim.g.nonexistant") eq(NIL, funcs.luaeval "vim.g.nonexistent")
eq(NIL, funcs.luaeval "vim.g.nullvar") eq(NIL, funcs.luaeval "vim.g.nullvar")
-- lost over RPC, so test locally: -- lost over RPC, so test locally:
eq({false, true}, exec_lua [[ eq({false, true}, exec_lua [[
return {vim.g.nonexistant == vim.NIL, vim.g.nullvar == vim.NIL} return {vim.g.nonexistent == vim.NIL, vim.g.nullvar == vim.NIL}
]]) ]])
eq({hello="world"}, funcs.luaeval "vim.g.to_delete") eq({hello="world"}, funcs.luaeval "vim.g.to_delete")
@@ -1123,12 +1123,12 @@ describe('lua stdlib', function()
eq('bye', funcs.luaeval "vim.b[BUF].testing") eq('bye', funcs.luaeval "vim.b[BUF].testing")
eq(123, funcs.luaeval "vim.b.other") eq(123, funcs.luaeval "vim.b.other")
eq(5120.1, funcs.luaeval "vim.b.floaty") eq(5120.1, funcs.luaeval "vim.b.floaty")
eq(NIL, funcs.luaeval "vim.b.nonexistant") eq(NIL, funcs.luaeval "vim.b.nonexistent")
eq(NIL, funcs.luaeval "vim.b[BUF].nonexistant") eq(NIL, funcs.luaeval "vim.b[BUF].nonexistent")
eq(NIL, funcs.luaeval "vim.b.nullvar") eq(NIL, funcs.luaeval "vim.b.nullvar")
-- lost over RPC, so test locally: -- lost over RPC, so test locally:
eq({false, true}, exec_lua [[ eq({false, true}, exec_lua [[
return {vim.b.nonexistant == vim.NIL, vim.b.nullvar == vim.NIL} return {vim.b.nonexistent == vim.NIL, vim.b.nullvar == vim.NIL}
]]) ]])
matches([[attempt to index .* nil value]], matches([[attempt to index .* nil value]],
@@ -1207,7 +1207,7 @@ describe('lua stdlib', function()
eq(NIL, funcs.luaeval "vim.b.testing") eq(NIL, funcs.luaeval "vim.b.testing")
eq(NIL, funcs.luaeval "vim.b.other") eq(NIL, funcs.luaeval "vim.b.other")
eq(NIL, funcs.luaeval "vim.b.nonexistant") eq(NIL, funcs.luaeval "vim.b.nonexistent")
end) end)
it('vim.w', function() it('vim.w', function()
@@ -1226,8 +1226,8 @@ describe('lua stdlib', function()
eq('hi', funcs.luaeval "vim.w.testing") eq('hi', funcs.luaeval "vim.w.testing")
eq('bye', funcs.luaeval "vim.w[WIN].testing") eq('bye', funcs.luaeval "vim.w[WIN].testing")
eq(123, funcs.luaeval "vim.w.other") eq(123, funcs.luaeval "vim.w.other")
eq(NIL, funcs.luaeval "vim.w.nonexistant") eq(NIL, funcs.luaeval "vim.w.nonexistent")
eq(NIL, funcs.luaeval "vim.w[WIN].nonexistant") eq(NIL, funcs.luaeval "vim.w[WIN].nonexistent")
matches([[attempt to index .* nil value]], matches([[attempt to index .* nil value]],
pcall_err(exec_lua, 'return vim.w[WIN][0].testing')) pcall_err(exec_lua, 'return vim.w[WIN][0].testing'))
@@ -1305,7 +1305,7 @@ describe('lua stdlib', function()
eq(NIL, funcs.luaeval "vim.w.testing") eq(NIL, funcs.luaeval "vim.w.testing")
eq(NIL, funcs.luaeval "vim.w.other") eq(NIL, funcs.luaeval "vim.w.other")
eq(NIL, funcs.luaeval "vim.w.nonexistant") eq(NIL, funcs.luaeval "vim.w.nonexistent")
end) end)
it('vim.t', function() it('vim.t', function()
@@ -1317,10 +1317,10 @@ describe('lua stdlib', function()
eq('hi', funcs.luaeval "vim.t.testing") eq('hi', funcs.luaeval "vim.t.testing")
eq(123, funcs.luaeval "vim.t.other") eq(123, funcs.luaeval "vim.t.other")
eq(NIL, funcs.luaeval "vim.t.nonexistant") eq(NIL, funcs.luaeval "vim.t.nonexistent")
eq('hi', funcs.luaeval "vim.t[0].testing") eq('hi', funcs.luaeval "vim.t[0].testing")
eq(123, funcs.luaeval "vim.t[0].other") eq(123, funcs.luaeval "vim.t[0].other")
eq(NIL, funcs.luaeval "vim.t[0].nonexistant") eq(NIL, funcs.luaeval "vim.t[0].nonexistent")
matches([[attempt to index .* nil value]], matches([[attempt to index .* nil value]],
pcall_err(exec_lua, 'return vim.t[0][0].testing')) pcall_err(exec_lua, 'return vim.t[0][0].testing'))
@@ -1387,7 +1387,7 @@ describe('lua stdlib', function()
eq(NIL, funcs.luaeval "vim.t.testing") eq(NIL, funcs.luaeval "vim.t.testing")
eq(NIL, funcs.luaeval "vim.t.other") eq(NIL, funcs.luaeval "vim.t.other")
eq(NIL, funcs.luaeval "vim.t.nonexistant") eq(NIL, funcs.luaeval "vim.t.nonexistent")
end) end)
it('vim.env', function() it('vim.env', function()

View File

@@ -1115,7 +1115,7 @@ if (h->n_buckets < new_n_buckets) { // expand
]]} ]]}
meths.buf_set_extmark(0, ns, 5, 0, { meths.buf_set_extmark(0, ns, 5, 0, {
virt_lines = { {{"^^ REVIEW:", "Todo"}, {" new_vals variable seems unneccesary?", "Comment"}} }; virt_lines = { {{"^^ REVIEW:", "Todo"}, {" new_vals variable seems unnecessary?", "Comment"}} };
}) })
-- TODO: what about the cursor?? -- TODO: what about the cursor??
screen:expect{grid=[[ screen:expect{grid=[[
@@ -1128,7 +1128,7 @@ if (h->n_buckets < new_n_buckets) { // expand
if (kh_is_map && val_size) { | if (kh_is_map && val_size) { |
^char *new_vals = {3:krealloc}( h->vals_buf, new_n_| ^char *new_vals = {3:krealloc}( h->vals_buf, new_n_|
buckets * val_size); | buckets * val_size); |
{5:^^ REVIEW:}{6: new_vals variable seems unneccesary?} | {5:^^ REVIEW:}{6: new_vals variable seems unnecessary?} |
h->vals_buf = new_vals; | h->vals_buf = new_vals; |
| |
]]} ]]}