diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-02-14 18:56:30 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-02-14 18:56:30 +0800 |
commit | dcefd48c1b7023bb1dce25bf9f6cfce47edbe993 (patch) | |
tree | 58bce3c008b9c154b93975b446c2520701dcaca4 | |
parent | c9b46f154bfd1208310f8de931e899f562da9a95 (diff) | |
download | rneovim-dcefd48c1b7023bb1dce25bf9f6cfce47edbe993.tar.gz rneovim-dcefd48c1b7023bb1dce25bf9f6cfce47edbe993.tar.bz2 rneovim-dcefd48c1b7023bb1dce25bf9f6cfce47edbe993.zip |
vim-patch:8.2.0156: various typos in source files and tests
Problem: Various typos in source files and tests.
Solution: Fix the typos. (Emir Sari, closes vim/vim#5532)
https://github.com/vim/vim/commit/4b96df5a017a04141c4e901b1fc5704a3ca48099
-rw-r--r-- | src/nvim/buffer.c | 3 | ||||
-rw-r--r-- | src/nvim/charset.c | 4 | ||||
-rw-r--r-- | src/nvim/ex_docmd.c | 2 | ||||
-rw-r--r-- | src/nvim/getchar.c | 2 | ||||
-rw-r--r-- | src/nvim/option.c | 2 | ||||
-rw-r--r-- | src/nvim/testdir/test_breakindent.vim | 2 | ||||
-rw-r--r-- | src/nvim/testdir/test_cindent.vim | 9 | ||||
-rw-r--r-- | src/nvim/testdir/test_digraph.vim | 4 | ||||
-rw-r--r-- | src/nvim/testdir/test_edit.vim | 2 | ||||
-rw-r--r-- | src/nvim/testdir/test_quickfix.vim | 2 | ||||
-rw-r--r-- | src/nvim/testdir/test_registers.vim | 2 | ||||
-rw-r--r-- | src/nvim/testdir/test_stat.vim | 2 |
12 files changed, 20 insertions, 16 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index 38b045b31c..19e5bb69f3 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -1441,7 +1441,7 @@ void set_curbuf(buf_T *buf, int action) set_bufref(&prevbufref, prevbuf); set_bufref(&newbufref, buf); - // Autocommands may delete the curren buffer and/or the buffer we want to go + // Autocommands may delete the current buffer and/or the buffer we want to go // to. In those cases don't close the buffer. if (!apply_autocmds(EVENT_BUFLEAVE, NULL, NULL, false, curbuf) || (bufref_valid(&prevbufref) && bufref_valid(&newbufref) @@ -1454,6 +1454,7 @@ void set_curbuf(buf_T *buf, int action) } if (bufref_valid(&prevbufref) && !aborting()) { win_T *previouswin = curwin; + // Do not sync when in Insert mode and the buffer is open in // another window, might be a timer doing something in another // window. diff --git a/src/nvim/charset.c b/src/nvim/charset.c index 583a040ed1..f4882e57e1 100644 --- a/src/nvim/charset.c +++ b/src/nvim/charset.c @@ -1439,7 +1439,7 @@ bool vim_isblankline(char_u *lbuf) /// @param unptr Returns the unsigned result. /// @param maxlen Max length of string to check. /// @param strict If true, fail if the number has unexpected trailing -/// alpha-numeric chars: *len is set to 0 and nothing else is +/// alphanumeric chars: *len is set to 0 and nothing else is /// returned. void vim_str2nr(const char_u *const start, int *const prep, int *const len, const int what, varnumber_T *const nptr, uvarnumber_T *const unptr, const int maxlen, @@ -1585,7 +1585,7 @@ vim_str2nr_hex: #undef PARSE_NUMBER vim_str2nr_proceed: - // Check for an alpha-numeric character immediately following, that is + // Check for an alphanumeric character immediately following, that is // most likely a typo. if (strict && ptr - (const char *)start != maxlen && ASCII_ISALNUM(*ptr)) { return; diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index 4dba0b97ed..18fff47a9c 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -7485,7 +7485,7 @@ static void ex_edit(exarg_T *eap) do_exedit(eap, NULL); } -/// ":edit <file>" command and alikes. +/// ":edit <file>" command and alike. /// /// @param old_curwin curwin before doing a split or NULL void do_exedit(exarg_T *eap, win_T *old_curwin) diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c index 5d8a8ddbfe..695656d072 100644 --- a/src/nvim/getchar.c +++ b/src/nvim/getchar.c @@ -2466,7 +2466,7 @@ static int vgetorpeek(bool advance) /// 1. a scriptfile /// 2. the keyboard /// -/// As much characters as we can get (up to 'maxlen') are put in "buf" and +/// As many characters as we can get (up to 'maxlen') are put in "buf" and /// NUL terminated (buffer length must be 'maxlen' + 1). /// Minimum for "maxlen" is 3!!!! /// diff --git a/src/nvim/option.c b/src/nvim/option.c index c8e50d4494..d97a22c342 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -4277,7 +4277,7 @@ static char *set_num_option(int opt_idx, char_u *varp, long value, char *errbuf, } // Save the global value before changing anything. This is needed as for - // a global-only option setting the "local value" infact sets the global + // a global-only option setting the "local value" in fact sets the global // value (since there is only one value). if ((opt_flags & (OPT_LOCAL | OPT_GLOBAL)) == 0) { old_global_value = *(long *)get_varp_scope(&(options[opt_idx]), OPT_GLOBAL); diff --git a/src/nvim/testdir/test_breakindent.vim b/src/nvim/testdir/test_breakindent.vim index b619f2adb6..438edb0257 100644 --- a/src/nvim/testdir/test_breakindent.vim +++ b/src/nvim/testdir/test_breakindent.vim @@ -1,7 +1,7 @@ " Test for breakindent " " Note: if you get strange failures when adding new tests, it might be that -" while the test is run, the breakindent cacheing gets in its way. +" while the test is run, the breakindent caching gets in its way. " It helps to change the tabstop setting and force a redraw (e.g. see " Test_breakindent08()) if !exists('+breakindent') diff --git a/src/nvim/testdir/test_cindent.vim b/src/nvim/testdir/test_cindent.vim index e5933ed80b..4b702bf2b8 100644 --- a/src/nvim/testdir/test_cindent.vim +++ b/src/nvim/testdir/test_cindent.vim @@ -815,7 +815,7 @@ func Test_cindent_1() } } - public: // <-- this was incorectly indented before!! + public: // <-- this was incorrectly indented before!! void testfall(); protected: void testfall(); @@ -1792,7 +1792,7 @@ func Test_cindent_1() } } - public: // <-- this was incorectly indented before!! + public: // <-- this was incorrectly indented before!! void testfall(); protected: void testfall(); @@ -5302,9 +5302,12 @@ endfunc " this was going beyond the end of the line. func Test_cindent_case() new - call setline(1, "case x: // x") + call setline(1, 'case x: // x') set cindent norm! f:a: + call assert_equal('case x:: // x', getline(1)) + + set cindent& bwipe! endfunc diff --git a/src/nvim/testdir/test_digraph.vim b/src/nvim/testdir/test_digraph.vim index d23748a3e3..5965ee48ef 100644 --- a/src/nvim/testdir/test_digraph.vim +++ b/src/nvim/testdir/test_digraph.vim @@ -81,7 +81,7 @@ func Test_digraphs() call Put_Dig(".e") call Put_Dig("a.") " not defined call assert_equal(['ḃ', 'ė', '.'], getline(line('.')-2,line('.'))) - " Diaresis + " Diaeresis call Put_Dig("a:") call Put_Dig(":u") call Put_Dig("b:") " not defined @@ -288,7 +288,7 @@ func Test_digraphs_option() call Put_Dig_BS(".","e") call Put_Dig_BS("a",".") " not defined call assert_equal(['ḃ', 'ė', '.'], getline(line('.')-2,line('.'))) - " Diaresis + " Diaeresis call Put_Dig_BS("a",":") call Put_Dig_BS(":","u") call Put_Dig_BS("b",":") " not defined diff --git a/src/nvim/testdir/test_edit.vim b/src/nvim/testdir/test_edit.vim index a1f6a84a99..360b3aaaa0 100644 --- a/src/nvim/testdir/test_edit.vim +++ b/src/nvim/testdir/test_edit.vim @@ -590,7 +590,7 @@ func Test_edit_CTRL_K() call feedkeys("A\<c-x>\<c-k>\<down>\<down>\<down>\<down>\<cr>\<esc>", 'tnix') call assert_equal(['AA'], getline(1, '$')) - " press an unexecpted key after dictionary completion + " press an unexpected key after dictionary completion %d call setline(1, 'A') call cursor(1, 1) diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim index c4d70fb1de..6852f53ea8 100644 --- a/src/nvim/testdir/test_quickfix.vim +++ b/src/nvim/testdir/test_quickfix.vim @@ -2739,7 +2739,7 @@ func Test_cwindow_jump() call assert_true(winnr('$') == 2) call assert_true(winnr() == 1) - " Jumping to a file from the location list window should find a usuable + " Jumping to a file from the location list window should find a usable " window by wrapping around the window list. enew | only call setloclist(0, [], 'f') diff --git a/src/nvim/testdir/test_registers.vim b/src/nvim/testdir/test_registers.vim index 2e92d9aa2f..23e39eba35 100644 --- a/src/nvim/testdir/test_registers.vim +++ b/src/nvim/testdir/test_registers.vim @@ -219,7 +219,7 @@ func Test_set_register() call setreg('=', 'b', 'a') call assert_equal('regwrite', getreg('=')) - " Test for settting a list of lines to special registers + " Test for setting a list of lines to special registers call setreg('/', []) call assert_equal('', @/) call setreg('=', []) diff --git a/src/nvim/testdir/test_stat.vim b/src/nvim/testdir/test_stat.vim index b44f3e9b94..d3059664e9 100644 --- a/src/nvim/testdir/test_stat.vim +++ b/src/nvim/testdir/test_stat.vim @@ -7,7 +7,7 @@ func CheckFileTime(doSleep) let times = [] let result = 0 - " Use three files istead of localtim(), with a network filesystem the file + " Use three files instead of localtim(), with a network filesystem the file " times may differ at bit let fl = ['Hello World!'] for fname in fnames |