mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
docs: fix typos
This commit is contained in:
parent
44b88d8c31
commit
4716a578ae
@ -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.
|
||||
|
||||
==============================================================================
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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
|
||||
---------
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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:
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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', @:)
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
|
@ -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'},
|
||||
|
@ -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([[
|
||||
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user