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)
4b96df5a01
This commit is contained in:
zeertzjq 2022-02-14 18:56:30 +08:00
parent c9b46f154b
commit dcefd48c1b
12 changed files with 20 additions and 16 deletions

View File

@ -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.

View File

@ -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;

View File

@ -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)

View File

@ -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!!!!
///

View File

@ -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')

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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')

View File

@ -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('=', [])

View File

@ -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