Fix some typos in documentation, C code and test files

closes: #18300

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
zeertzjq
2025-09-15 19:42:30 +00:00
committed by Christian Brabandt
parent 817e4d3ee6
commit 0e46e761fc
14 changed files with 27 additions and 27 deletions

View File

@ -3451,7 +3451,7 @@ set_cpt_callbacks(optset_T *args)
}
}
if (!local) // ':set' used insted of ':setlocal'
if (!local) // ':set' used instead of ':setlocal'
// Cache the callback array
if (copy_cpt_callbacks(&cpt_cb, &cpt_cb_count, curbuf->b_p_cpt_cb,
curbuf->b_p_cpt_count) != OK)

View File

@ -9546,7 +9546,7 @@ socket_server_send(
char_u *str, // What to send
char_u **result, // Set to result of expr
char_u **receiver, // Full path of "name"
int is_expr, // Is it an expresison or keystrokes?
int is_expr, // Is it an expression or keystrokes?
int timeout, // In milliseconds
int silent) // Don't complain if socket doesn't exist
{
@ -9628,7 +9628,7 @@ socket_server_send(
else
vim_free(path);
// Exit, we aren't waiting for a reponse
// Exit, we aren't waiting for a response
return 0;
}
@ -9935,7 +9935,7 @@ socket_server_init_cmd(ss_cmd_T *cmd, ss_cmd_type_T type)
/*
* Append a message to a command. Note that "len" is the length of contents.
* Returns OK on sucess and FAIL on failure
* Returns OK on success and FAIL on failure
*/
static int
socket_server_append_msg(ss_cmd_T *cmd, char_u type, char_u *contents, int len)
@ -10386,7 +10386,7 @@ socket_server_exec_cmd(ss_cmd_T *cmd, int fd)
STRLEN(result) + 1); // We add +1 in case "result"
// is an empty string.
else
// An error occured, return an error msg instead
// An error occurred, return an error msg instead
socket_server_append_msg(&rcmd, SS_MSG_TYPE_STRING,
(char_u *)_(e_invalid_expression_received),
STRLEN(e_invalid_expression_received));
@ -10563,7 +10563,7 @@ socket_server_dispatch(int timeout)
}
/*
* Check if socket "name" is reponsive by sending an ALIVE command. This does
* Check if socket "name" is responsive by sending an ALIVE command. This does
* not require the socket server to be active.
*/
static int

View File

@ -150,7 +150,7 @@ draw_tabpanel(void)
if (maxwidth == 0)
return;
// Reset got_int to avoid build_stl_str_hl() isn't evaluted.
// Reset got_int to avoid build_stl_str_hl() isn't evaluated.
got_int = FALSE;
if (tpl_is_vert)

View File

@ -5911,7 +5911,7 @@ handle_osc(char_u *tp, int len, char_u *key_name, int *slen)
LOG_TRN("Received OSC response: %s", (char*)tp);
// Check if it is a valid OSC sequence, and consume it. OSC format
// consists of:
// <idenfitifer><data><terminator>
// <identifier><data><terminator>
// <identifier> is either <Esc>] or an OSC character
// <terminator> can be '\007', <Esc>\ or STERM.
cur = 1 + (tp[0] == ESC);

View File

@ -5023,7 +5023,7 @@ func Test_nonkeyword_trigger()
call assert_equal('a#', getline('.'))
set completeopt&
" Test 2: Filter nonkeyword and keyword matches with differet startpos
" Test 2: Filter nonkeyword and keyword matches with different startpos
set completeopt+=menuone,noselect
call feedkeys("S#a\<C-N>b\<F2>\<F3>\<Esc>0", 'tx!')
call assert_equal(['abc', 'abcd', '#abar'], b:matches->mapnew('v:val.word'))
@ -5144,7 +5144,7 @@ func Test_autocomplete_trigger()
call assert_equal(2, g:CallCount)
call assert_equal('a#', getline('.'))
" Test 2: Filter nonkeyword and keyword matches with differet startpos
" Test 2: Filter nonkeyword and keyword matches with different startpos
for fuzzy in range(2)
if fuzzy
set completeopt+=fuzzy

View File

@ -12518,7 +12518,7 @@ def Test_super_keyword()
END
v9.CheckSourceFailure(lines, 'E1326: Variable "foo" not found in object "B"')
# Using super to access an overriden method in the parent class
# Using super to access an overridden method in the parent class
lines =<< trim END
vim9script

View File

@ -137,7 +137,7 @@ func Test_wayland_wlrestore()
call assert_equal('2', getreg('+'))
" Check if wlrestore doesn't disconnect the display if not nessecary by seeing
" Check if wlrestore doesn't disconnect the display if not necessary by seeing
" if Vim doesn't lose the selection
call setreg('+', 'testing', 'c')
@ -209,7 +209,7 @@ func Test_wayland_paste()
bw!
" Check behaviour when selecton is cleared (empty)
" Check behaviour when selection is cleared (empty)
call system('wl-copy --clear')
call assert_fails('put +', 'E353:')
endfunc

View File

@ -702,7 +702,7 @@ func Test_xxd_overflow()
bw!
endfunc
" this caused a NULL derefence
" this caused a NULL dereference
func Test_xxd_null_dereference()
CheckUnix
CheckExecutable /bin/true

View File

@ -30,7 +30,7 @@ typedef struct {
struct wl_seat *proxy;
char *label; // Name of seat as text (e.g. seat0,
// seat1...).
uint32_t capabilities; // Bitmask of the capabilites of the seat
uint32_t capabilities; // Bitmask of the capabilities of the seat
// (pointer, keyboard, touch).
} vwl_seat_T;
@ -618,7 +618,7 @@ vwl_log_handler(const char *fmt, va_list args)
/*
* Connect to the display with name; passing NULL will use libwayland's way of
* getting the display. Additionally get the registry object but will not
* starting listening. Returns OK on sucess and FAIL on failure.
* starting listening. Returns OK on success and FAIL on failure.
*/
static int
vwl_connect_display(const char *display)
@ -2275,7 +2275,7 @@ wayland_cb_own_selection(
// better to do it this way. Additionally other Wayland applications
// seem to set the selection every time.
//
// There should be no noticable performance change since its not
// There should be no noticeable performance change since its not
// like this is running in the background constantly in Vim, only
// runs once when the user yanks text to the system clipboard.
vwl_data_source_destroy(&clip_sel->source, FALSE);