Problem: Various spelling mistakes in comments.
Solution: Fix the mistakes. (Dominique Pellé, closes #9416)
// if some blocks are released call malloc again.
for (;;)
{
- // Handle three kind of systems:
+ // Handle three kinds of systems:
// 1. No check for available memory: Just return.
// 2. Slow check for available memory: call mch_avail_mem() after
// allocating KEEP_ROOM amount of memory.
state->method_state = bfs;
// "blowfish" uses a 64 byte buffer, causing it to repeat 8 byte groups 8
- // times. "blowfish2" uses a 8 byte buffer to avoid repeating.
+ // times. "blowfish2" uses an 8 byte buffer to avoid repeating.
bfs->cfb_len = state->method_nr == CRYPT_M_BF ? BF_MAX_CFB_LEN : BF_BLOCK;
if (blowfish_self_test() == FAIL)
if (curbuf->b_ml.ml_mfp == NULL) // need to load the file
{
// If there is no filetype, allow for detecting one. Esp. useful for
- // ":ball" used in a autocommand. If there already is a filetype we
+ // ":ball" used in an autocommand. If there already is a filetype we
// might prefer to keep it.
if (*curbuf->b_p_ft == NUL)
did_filetype = FALSE;
sp->userhl = 0;
}
- // When inside update_screen we do not want redrawing a stausline, ruler,
+ // When inside update_screen we do not want redrawing a statusline, ruler,
// title, etc. to trigger another redraw, it may cause an endless loop.
if (updating_screen)
{
if (*s == ')' && cin_nocode(s + 1))
{
// ')' at the end: may have found a match
- // Check for he previous line not to end in a backslash:
+ // Check for the previous line not to end in a backslash:
// #if defined(x) && {backslash}
// defined(y)
lnum = first_lnum - 1;
buf->b_ind_unclosed2 = sw;
// Suppress ignoring spaces from the indent of a line starting with an
- // unclosed parentheses.
+ // unclosed parenthesis.
buf->b_ind_unclosed_noignore = 0;
// If the opening paren is the last nonwhite character on the line, and
// an unclosed parenthesis.
buf->b_ind_unclosed_whiteok = 0;
- // Indent a closing parentheses under the line start of the matching
- // opening parentheses.
+ // Indent a closing parenthesis under the line start of the matching
+ // opening parenthesis.
buf->b_ind_matching_paren = 0;
- // Indent a closing parentheses under the previous line.
+ // Indent a closing parenthesis under the previous line.
buf->b_ind_paren_prev = 0;
// Extra indent for comments.
return;
p = ScreenLines + LineOffset[row];
- // Correct for starting in the right halve of a double-wide char
+ // Correct for starting in the right half of a double-wide char
if (enc_dbcs != 0)
col -= dbcs_screen_head_off(p, p + col);
else if (enc_utf8 && p[col] == 0)
if (row2 > clip_star.max_row)
row2 = clip_star.max_row;
#endif
- // correct starting point for being on right halve of double-wide char
+ // correct starting point for being on right half of double-wide char
p = ScreenLines + LineOffset[row1];
if (enc_dbcs != 0)
col1 -= (*mb_head_off)(p, p + col1);
bufp);
}
}
- // Skip right halve of double-wide character.
+ // Skip right half of double-wide character.
if (ScreenLines[off + i + 1] == 0)
++i;
}
if (wp_other != NULL && curwin->w_p_scb)
{
if (used_max_fill_curwin)
- // The current window was set to used the maximum number of filler
+ // The current window was set to use the maximum number of filler
// lines, may need to reduce them.
diff_set_topline(wp_other, curwin);
else if (used_max_fill_other)
- // The other window was set to used the maximum number of filler
+ // The other window was set to use the maximum number of filler
// lines, may need to reduce them.
diff_set_topline(curwin, wp_other);
}
diff_clear(curtab);
}
- // Remove "hor" from from 'scrollopt' if there are no diff windows left.
+ // Remove "hor" from 'scrollopt' if there are no diff windows left.
if (!diffwin && vim_strchr(p_sbo, 'h') != NULL)
do_cmdline_cmd((char_u *)"set sbo-=hor");
}
// Make sure, the highlighting for the tab char will be
// correctly set further below (effectively reverts the
- // FIX_FOR_BOGSUCOLS macro
+ // FIX_FOR_BOGSUCOLS macro).
if (n_extra == tab_len + vc_saved && wp->w_p_list
&& wp->w_lcs_chars.tab1)
tab_len += vc_saved;
#if defined(FEAT_RIGHTLEFT)
if (has_mbyte && wp->w_p_rl && (*mb_char2cells)(mb_c) > 1)
{
- // A double-wide character is: put first halve in left cell.
+ // A double-wide character is: put first half in left cell.
--off;
--col;
}
*/
static int pc_status;
#define PC_STATUS_UNSET 0 // pc_bytes was not set
-#define PC_STATUS_RIGHT 1 // right halve of double-wide char
-#define PC_STATUS_LEFT 2 // left halve of double-wide char
+#define PC_STATUS_RIGHT 1 // right half of double-wide char
+#define PC_STATUS_LEFT 2 // left half of double-wide char
#define PC_STATUS_SET 3 // pc_bytes was filled
static char_u pc_bytes[MB_MAXBYTES + 1]; // saved bytes
static int pc_attr;
// "start" is set to eap->line2+1 unless that position is invalid (when
// eap->line2 pointed to the end of the buffer and nothing was appended)
// "end" is set to lnum when something has been appended, otherwise
- // it is the same than "start" -- Acevedo
+ // it is the same as "start" -- Acevedo
if ((cmdmod.cmod_flags & CMOD_LOCKMARKS) == 0)
{
curbuf->b_op_start.lnum = (eap->line2 < curbuf->b_ml.ml_line_count) ?
break;
}
- // Not not recognize ":*" as the star command unless '*' is in
+ // Do not recognize ":*" as the star command unless '*' is in
// 'cpoptions'.
if (eap->cmdidx == CMD_star && vim_strchr(p_cpo, CPO_STAR) == NULL)
p = eap->cmd;
|| eap->cmdidx == CMD_tabedit
|| eap->cmdidx == CMD_vnew) && *eap->arg == NUL)
{
- // ":new" or ":tabnew" without argument: edit an new empty buffer
+ // ":new" or ":tabnew" without argument: edit a new empty buffer
setpcmark();
(void)do_ecmd(0, NULL, NULL, eap, ECMD_ONE,
ECMD_HIDE + (eap->forceit ? ECMD_FORCEIT : 0),
// downward search loop
for (;;)
{
- // check if user user wants to stop the search
+ // check if user wants to stop the search
ui_breakcheck();
if (got_int)
break;
int url = FALSE;
#endif
- // For an URL we only compare the name, otherwise we compare the
+ // For a URL we only compare the name, otherwise we compare the
// device/inode (unix) or the full path name (not Unix).
if (path_with_url(fname))
{
*/
while (!got_int)
{
- // set concat to 1 if it's allowed to concatenated this fold
+ // set concat to 1 if it's allowed to concatenate this fold
// with a previous one that touches it.
if (flp->start != 0 || flp->had_end <= MAX_LEVEL)
concat = 0;
// typebuf.tb_buf has three parts: room in front (for result of mappings), the
// middle for typeahead and room for new characters (which needs to be 3 *
-// MAXMAPLEN) for the Amiga).
+// MAXMAPLEN for the Amiga).
#define TYPELEN_INIT (5 * (MAXMAPLEN + 3))
static char_u typebuf_init[TYPELEN_INIT]; // initial typebuf.tb_buf
static char_u noremapbuf_init[TYPELEN_INIT]; // initial typebuf.tb_noremap
*
* If noremap is REMAP_YES, new string can be mapped again.
* If noremap is REMAP_NONE, new string cannot be mapped again.
- * If noremap is REMAP_SKIP, fist char of new string cannot be mapped again,
+ * If noremap is REMAP_SKIP, first char of new string cannot be mapped again,
* but abbreviations are allowed.
* If noremap is REMAP_SCRIPT, new string cannot be mapped again, except for
* script-local mappings.
inchar(
char_u *buf,
int maxlen,
- long wait_time) // milli seconds
+ long wait_time) // milliseconds
{
int len = 0; // init for GCC
int retesc = FALSE; // return ESC with gotint
static int recursive = 0;
/*
- * It's possible to use ":gui" in a .gvimrc file. The first halve of this
+ * It's possible to use ":gui" in a .gvimrc file. The first half of this
* function will then be executed at the first call, the rest by the
* recursive call. This allow the shell to be opened halfway reading a
* gvimrc file.
#ifdef FEAT_RIGHTLEFT
if (CURSOR_BAR_RIGHT)
{
- // gui.col points to the left halve of the character but
- // the vertical line needs to be on the right halve.
+ // gui.col points to the left half of the character but
+ // the vertical line needs to be on the right half.
// A double-wide horizontal line is also drawn from the
- // right halve in gui_mch_draw_part_cursor().
+ // right half in gui_mch_draw_part_cursor().
col_off = TRUE;
++gui.col;
}
{
char_u buf[MB_MAXBYTES + 1];
- // Don't draw right halve of a double-width UTF-8 char. "cannot happen"
+ // Don't draw right half of a double-width UTF-8 char. "cannot happen"
if (enc_utf8 && ScreenLines[off] == 0)
return OK;
gui_inchar(
char_u *buf,
int maxlen,
- long wtime, // milli seconds
+ long wtime, // milliseconds
int tb_change_cnt)
{
return gui_wait_for_chars_buf(buf, maxlen, wtime, tb_change_cnt);
* selection. But if Visual is active, assume that only the Visual area
* will be selected.
* Exception: On the command line, both the selection is used and a mouse
- * key is send.
+ * key is sent.
*/
if (!mouse_has(checkfor) || checkfor == MOUSE_COMMAND)
{
// When the screen is being updated we should not change buffers and
// windows structures, it may cause freed memory to be used. Also don't
- // do this recursively (pressing "Find" quickly several times.
+ // do this recursively (pressing "Find" quickly several times).
if (updating_screen || busy)
return FALSE;
else if (value < 0)
value = 0;
- // Update the bottom scrollbar an extra time (why is this needed??
+ // Update the bottom scrollbar an extra time (why is this needed??)
if (sb->wp == NULL) // Bottom scrollbar
gui_mch_set_scrollbar_thumb(sb, value, sb->size, sb->max);
gtk_window_present(GTK_WINDOW(frdp->dialog));
// For :promptfind dialog, always give keyboard focus to 'what' entry.
- // For :promptrepl dialog, give it to 'with' entry if 'what' has an
+ // For :promptrepl dialog, give it to 'with' entry if 'what' has a
// non-empty entry; otherwise, to 'what' entry.
gtk_widget_grab_focus(frdp->what);
if (do_replace && entry_get_text_length(GTK_ENTRY(frdp->what)) > 0)
// Create the dialog message.
// Since LessTif is apparently having problems with the creation of
// properly localized string, we use LtoR here. The symptom is that the
- // string sill not show properly in multiple lines as it does in native
+ // string is not shown properly in multiple lines as it does in native
// Motif.
label = XmStringCreateLtoR((char *)message, STRING_TAG);
if (label == NULL)
if (key->key_cap >= Pk_KP_Enter && key->key_cap <= Pk_KP_9
&& (key->key_mods & Pk_KM_Num_Lock))
{
- // FIXME: For now, just map the key to a ascii value
+ // FIXME: For now, just map the key to an ascii value
// (see <photon/PkKeyDef.h>)
ch = key->key_cap - 0xf080;
}
if (!is_window_onscreen(s_hwnd))
return SW_INVALIDATE;
- // Check if there is an window (partly) on top of us.
+ // Check if there is a window (partly) on top of us.
GetWindowRect(s_hwnd, &rcVim);
for (hwnd = s_hwnd; (hwnd = GetWindow(hwnd, GW_HWNDPREV)) != (HWND)0; )
if (IsWindowVisible(hwnd))
if (!pImmGetContext)
return NULL; // no imm32.dll
- // Try Unicode; this'll always work on NT regardless of codepage.
+ // Try Unicode; this will always work on NT regardless of codepage.
ret = pImmGetCompositionStringW(hIMC, GCS, NULL, 0);
if (ret == 0)
return NULL; // empty
return (short_u *)wbuf;
}
- // ret < 0; we got an error, so try the ANSI version. This'll work
+ // ret < 0; we got an error, so try the ANSI version. This will work
// on 9x/ME, but only if the codepage happens to be set to whatever
// we're inputting.
ret = pImmGetCompositionStringA(hIMC, GCS, NULL, 0);
*p++ = 0; // advance pointer over nExtraStuff WORD - 2 more
- return p; //total = 15+ (strlen(caption)) words
- // = 30 + 2(strlen(caption) bytes reqd
+ return p; // total = 15 + strlen(caption) words
+ // bytes read = 2 * total
}
}
else
{
- // FIXME: We should calculate an drawing offset for the pixmap here to
+ // FIXME: We should calculate a drawing offset for the pixmap here to
// adjust it.
}
# if !(defined(PY_NO_RTLD_GLOBAL) && defined(PY3_NO_RTLD_GLOBAL)) && defined(UNIX) && defined(FEAT_PYTHON3)
// Can't have Python and Python3 loaded at the same time.
- // It cause a crash, because RTLD_GLOBAL is needed for
+ // It causes a crash, because RTLD_GLOBAL is needed for
// standard C extension libraries of one or both python versions.
if (python3_loaded())
{
PyInt len = strlen(str);
char *p;
- // Allocate an Python string object, with uninitialised contents. We
+ // Allocate a Python string object, with uninitialised contents. We
// must do it this way, so that we can modify the string in place
// later. See the Python source, Objects/stringobject.c for details.
result = PyString_FromStringAndSize(NULL, len);
# if !(defined(PY_NO_RTLD_GLOBAL) && defined(PY3_NO_RTLD_GLOBAL)) && defined(UNIX) && defined(FEAT_PYTHON)
// Can't have Python and Python3 loaded at the same time.
- // It cause a crash, because RTLD_GLOBAL is needed for
+ // It causes a crash, because RTLD_GLOBAL is needed for
// standard C extension libraries of one or both python versions.
if (python_loaded())
{
DeleteAnyLingerer(dpy, newwin);
if (serverName != NULL)
{
- // Reinsert name if we was already registered
+ // Reinsert name if it was already registered
(void)LookupName(dpy, serverName, /*delete=*/TRUE, NULL);
sprintf((char *)propInfo, "%x %.*s",
(int_u)newwin, MAX_NAME_LENGTH, serverName);
mch_dirname(start_dir, MAXPATHL);
// Temporarily add '(' and ')' to 'isfname'. These are valid
// filename characters but are excluded from 'isfname' to make
- // "gf" work on a file name in parenthesis (e.g.: see vim.h).
+ // "gf" work on a file name in parentheses (e.g.: see vim.h).
do_cmdline_cmd((char_u *)":set isf+=(,)");
alist_expand(NULL, 0);
do_cmdline_cmd((char_u *)":set isf&");
* MSDOS compatible filesystem, it is possible that the file
* "test.doc.swp" which we create will be exactly the same file. To avoid
* this problem we temporarily create "test.doc". Don't do this when the
- * check below for a 8.3 file name is used.
+ * check below for an 8.3 file name is used.
*/
if (!(buf->b_p_sn || buf->b_shortname) && buf_fname != NULL
&& mch_getperm(buf_fname) < 0)
goto erret;
}
- // Not already there, so lets add it
+ // Not already there, so let's add it
menu = ALLOC_CLEAR_ONE(vimmenu_T);
if (menu == NULL)
goto erret;
// Recalculate modes for menu based on the new updated children
menu->modes &= ~modes;
#if defined(FEAT_GUI_MSWIN) & defined(FEAT_TEAROFF)
- if ((s_tearoffs) && (menu->children != NULL)) // there's a tear bar..
+ if ((s_tearoffs) && (menu->children != NULL)) // there's a tear bar.
child = menu->children->next; // don't count tearoff bar
else
#endif
{
// The menu item is no longer valid in ANY mode, so delete it
#if defined(FEAT_GUI_MSWIN) & defined(FEAT_TEAROFF)
- if (s_tearoffs && menu->children != NULL) // there's a tear bar..
+ if (s_tearoffs && menu->children != NULL) // there's a tear bar.
free_menu(&menu->children);
#endif
*menup = menu;
{
int save_p_more = p_more;
- p_more = FALSE; // don't want see this message when scrolling back
+ p_more = FALSE; // don't want to see this message when scrolling back
if (msg_didout) // start on a new line
msg_putchar('\n');
if (got_int)
return 1;
#ifdef FEAT_FOLDING
- // A folded lines is handled just like an empty line.
+ // Folded lines are handled just like an empty line.
// NOTE: Caller must handle lines that are MAYBE folded.
if (lineFolded(wp, lnum) == TRUE)
return 1;
}
else if (extra == 1)
{
- // less then 'scrolloff' lines above, decrease skipcol
+ // less than 'scrolloff' lines above, decrease skipcol
extra = (curwin->w_skipcol + so * width - curwin->w_virtcol
+ width - 1) / width;
if (extra > 0)
}
else if (extra == 2)
{
- // less then 'scrolloff' lines below, increase skipcol
+ // less than 'scrolloff' lines below, increase skipcol
endcol = (n - curwin->w_height + 1) * width;
while (endcol > curwin->w_virtcol)
endcol -= width;
else if ((char_u **)varp == &p_fencs && enc_utf8)
newval = fencs_utf8_default;
- // expand environment variables and ~ (since the
+ // expand environment variables and ~ since the
// default value was already expanded, only
// required when an environment variable was set
// later
}
}
- // Arabic requires a utf-8 encoding, inform the user if its not
+ // Arabic requires a utf-8 encoding, inform the user if it's not
// set.
if (STRCMP(p_enc, "utf-8") != 0)
{
mch_inchar(
char_u *buf,
int maxlen,
- long time, // milli seconds
+ long time, // milliseconds
int tb_change_cnt)
{
int len;
*/
// Before Including the MacOS specific files,
-// lets set the OPAQUE_TOOLBOX_STRUCTS to 0 so we
+// let's set the OPAQUE_TOOLBOX_STRUCTS to 0 so we
// can access the internal structures.
// (Until fully Carbon compliant)
// TODO: Can we remove this? (Dany)
kCFStringEncodingMacRoman,
0, // no lossy conversion
0, // not external representation (since vim
- // handles this internally
+ // handles this internally)
to, maxtolen, &l))
{
CFRelease(cfstr);
# define VIM_CLASSNAME "VIM_MESSAGES"
# define VIM_CLASSNAME_LEN (sizeof(VIM_CLASSNAME) - 1)
-// Communication is via WM_COPYDATA messages. The message type is send in
+// Communication is via WM_COPYDATA messages. The message type is sent in
// the dwData parameter. Types are defined here.
# define COPYDATA_KEYS 0
# define COPYDATA_REPLY 1
return sendToLocalVim(cmd, asExpr, result);
// If the server name does not end in a digit then we look for an
- // alternate name. e.g. when "name" is GVIM the we may find GVIM2.
+ // alternate name. e.g. when "name" is GVIM then we may find GVIM2.
if (STRLEN(name) > 1 && !vim_isdigit(name[STRLEN(name) - 1]))
altname_buf_ptr = altname_buf;
altname_buf[0] = NUL;
// Therefore, this check does not have any sense - let keep us to the
// conventions instead:
// *.COM and *.EXE files are the executables - the rest are not. This is
- // not ideal but better then it was.
+ // not ideal but better than it was.
int vms_executable = 0;
if (S_ISREG(st.st_mode) && mch_access((char *)name, X_OK) == 0)
{
}
}
- // Prepend single "." to pathext, it's means no extension added.
+ // Prepend single "." to pathext, it means no extension added.
if (pathext == NULL)
pathext = (char_u *)".";
else if (noext == TRUE)
// Now expand wildcards in the arguments.
// Temporarily add '(' and ')' to 'isfname'. These are valid
// filename characters but are excluded from 'isfname' to make
- // "gf" work on a file name in parenthesis (e.g.: see vim.h).
+ // "gf" work on a file name in parentheses (e.g.: see vim.h).
// Also, unset wildignore to not be influenced by this option.
// The arguments specified in command-line should be kept even if
// encoding options were changed.
#define HAVE_PUTENV // at least Bcc 5.2 and MSC have it
#if defined(FEAT_GUI_MSWIN) && !defined(VIMDLL)
-# define NO_CONSOLE // don't included console-only code
+# define NO_CONSOLE // don't include console-only code
#endif
// toupper() is not really broken, but it's very slow. Probably because of
int len;
buf_T *errbuf;
- // If the 'quickfixtextfunc' function returned an non-empty custom string
+ // If the 'quickfixtextfunc' function returned a non-empty custom string
// for this entry, then use it.
if (qftf_str != NULL && *qftf_str != NUL)
vim_strncpy(IObuff, qftf_str, IOSIZE - 1);
// will emit NFA_STAR.
// Bail out if we can use the other engine, but only, when the
// pattern does not need the NFA engine like (e.g. [[:upper:]]\{2,\}
- // does not work with with characters > 8 bit with the BT engine)
+ // does not work with characters > 8 bit with the BT engine)
if ((nfa_re_flags & RE_AUTO)
&& (maxval > 500 || maxval > minval + 200)
&& (maxval != MAX_LIMIT && minval < 200)
// First add the state(s) at the end, so that we know how many there are.
// Pass the listidx as offset (avoids adding another argument to
- // addstate().
+ // addstate()).
r = addstate(l, state, subs, pim, -listidx - ADDSTATE_HERE_OFFSET);
if (r == NULL)
return NULL;
}
// When writing a single-width character over a double-width
// character and at the end of the redrawn text, need to clear out
- // the right halve of the old character.
- // Also required when writing the right halve of a double-width
- // char over the left halve of an existing one.
+ // the right half of the old character.
+ // Also required when writing the right half of a double-width
+ // char over the left half of an existing one.
if (has_mbyte && col + char_cells == endcol
&& ((char_cells == 1
&& (*mb_off2cells)(off_to, max_off_to) > 1)
return;
off = LineOffset[row] + col;
- // When drawing over the right halve of a double-wide char clear out the
- // left halve. Only needed in a terminal.
+ // When drawing over the right half of a double-wide char clear out the
+ // left half. Only needed in a terminal.
if (has_mbyte && col > 0 && col < screen_Columns
#ifdef FEAT_GUI
&& !gui.in_use
#endif
// When at the end of the text and overwriting a two-cell
// character with a one-cell character, need to clear the next
- // cell. Also when overwriting the left halve of a two-cell char
- // with the right halve of a two-cell char. Do this only once
- // (mb_off2cells() may return 2 on the right halve).
+ // cell. Also when overwriting the left half of a two-cell char
+ // with the right half of a two-cell char. Do this only once
+ // (mb_off2cells() may return 2 on the right half).
if (clear_next_cell)
clear_next_cell = FALSE;
else if (has_mbyte
#endif
)
{
- // When drawing over the right halve of a double-wide char clear
- // out the left halve. When drawing over the left halve of a
- // double wide-char clear out the right halve. Only needed in a
+ // When drawing over the right half of a double-wide char clear
+ // out the left half. When drawing over the left half of a
+ // double wide-char clear out the right half. Only needed in a
// terminal.
if (start_col > 0 && mb_fix_col(start_col, row) != start_col)
screen_puts_len((char_u *)" ", 1, row, start_col - 1, 0);
current_sctx.sc_lnum = 0;
- // Check if this script was sourced before to finds its SID.
+ // Check if this script was sourced before to find its SID.
// Always use a new sequence number.
current_sctx.sc_seq = ++last_current_SID_seq;
if (sid > 0)
/*
* For spell checking: concatenate the start of the following line "line" into
- * "buf", blanking-out special characters. Copy less then "maxlen" bytes.
+ * "buf", blanking-out special characters. Copy less than "maxlen" bytes.
* Keep the blanks at the start of the next line, this is used in win_line()
* to skip those bytes if the word was OK.
*/
for (; (s = smp[n].sm_lead)[0] == c; ++n)
{
// Quickly skip entries that don't match the word. Most
- // entries are less then three chars, optimize for that.
+ // entries are less than three chars, optimize for that.
k = smp[n].sm_leadlen;
if (k > 1)
{
&& ws[0] != NUL; ++n)
{
// Quickly skip entries that don't match the word. Most
- // entries are less then three chars, optimize for that.
+ // entries are less than three chars, optimize for that.
if (c != ws[0])
continue;
k = smp[n].sm_leadlen;
arridx[depth] = idxs[n];
curi[depth] = 1;
- // Check if this characters matches with the pattern.
+ // Check if this character matches with the pattern.
// If not skip the whole tree below it.
// Always ignore case here, dump_word() will check
// proper case later. This isn't exactly right when
//
// The table with character flags and the table for case folding.
// This makes sure the same characters are recognized as word characters
- // when generating an when using a spell file.
+ // when generating and when using a spell file.
// Skip this for ASCII, the table may conflict with the one used for
// 'encoding'.
// Also skip this for an .add.spl file, the main spell file must contain
++wordnr;
// Remove extra NUL entries, we no longer need them. We don't
- // bother freeing the nodes, the won't be reused anyway.
+ // bother freeing the nodes, they won't be reused anyway.
while (p->wn_sibling != NULL && p->wn_sibling->wn_byte == NUL)
p->wn_sibling = p->wn_sibling->wn_sibling;
#define SCORE_THRES3 100 // word count threshold for COMMON3
// When trying changed soundfold words it becomes slow when trying more than
-// two changes. With less then two changes it's slightly faster but we miss a
+// two changes. With less than two changes it's slightly faster but we miss a
// few good suggestions. In rare cases we need to try three of four changes.
#define SCORE_SFMAX1 200 // maximum score for first try
#define SCORE_SFMAX2 300 // maximum score for second try
// itself must be escaped to get a literal '\'.
fish_like = fish_like_shell();
- // PowerShell uses it's own version for quoting single quotes
+ // PowerShell uses its own version for quoting single quotes
shname = gettail(p_sh);
powershell = strstr((char *)shname, "pwsh") != NULL;
# ifdef MSWIN
#endif
#if defined(CHECK_DOUBLE_CLICK) || defined(PROTO)
/*
- * Checking for double clicks ourselves.
+ * Checking for double-clicks ourselves.
* "orig_topline" is used to avoid detecting a double-click when the window
* contents scrolled (e.g., when 'scrolloff' is non-zero).
*/
{
job_T *job = term->tl_job;
- // Careful: Checking the job status may invoked callbacks, which close
+ // Careful: Checking the job status may invoke callbacks, which close
// the buffer and terminate "term". However, "job" will not be freed
// yet.
if (check_job_status)
call RunDbgCmd(buf, 'step', ['line 1: SourceAnotherFile()'])
call RunDbgCmd(buf, 'step', ['line 1: source Xtest2.vim'])
- " Repeated line, because we fist are in the compiled function before the
+ " Repeated line, because we first are in the compiled function before the
" EXEC and then in do_cmdline() before the :source command.
call RunDbgCmd(buf, 'step', ['line 1: source Xtest2.vim'])
call RunDbgCmd(buf, 'step', ['line 1: vim9script'])
call delete('Xfile.vim')
endfunc
-" Test for expanding <sfile> in a autocmd and for <slnum> and <sflnum>
+" Test for expanding <sfile> in an autocmd and for <slnum> and <sflnum>
func Test_source_autocmd_sfile()
let code =<< trim [CODE]
let g:SfileName = ''
// If first leader has 'f' flag, the lines can be joined only if the
// second line does not have a leader.
// If first leader has 'e' flag, the lines can never be joined.
- // If fist leader has 's' flag, the lines can only be joined if there is
+ // If first leader has 's' flag, the lines can only be joined if there is
// some text after it and the second line has the 'm' flag.
if (leader1_flags != NULL)
{
if (heredoc_concat_len > 0)
{
- // For a :def function "python << EOF" concatenats all the lines,
+ // For a :def function "python << EOF" concatenates all the lines,
// to be used for the instruction later.
ga_concat(&heredoc_ga, theline);
ga_concat(&heredoc_ga, (char_u *)"\n");
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 3914,
/**/
3913,
/**/
#define DOBUF_UNLOAD 2 // unload specified buffer(s)
#define DOBUF_DEL 3 // delete specified buffer(s) from buflist
#define DOBUF_WIPE 4 // delete specified buffer(s) really
-#define DOBUF_WIPE_REUSE 5 // like DOBUF_WIPE an keep number for reuse
+#define DOBUF_WIPE_REUSE 5 // like DOBUF_WIPE and keep number for reuse
// Values for start argument for do_buffer()
#define DOBUF_CURRENT 0 // "count" buffer from current buffer
garray_T ctx_locals; // currently visible local variables
- int ctx_has_closure; // set to one if a closures was created in
+ int ctx_has_closure; // set to one if a closure was created in
// the function
garray_T ctx_imports; // imported items
if (cctx->ctx_skip != SKIP_YES)
{
- // If we know the type of "var" and it is a not a supported type we can
+ // If we know the type of "var" and it is not a supported type we can
// give an error now.
vartype = ((type_T **)stack->ga_data)[stack->ga_len - 1];
if (vartype->tt_type != VAR_LIST
int refcount = pt->pt_refcount;
int i;
- // A Reference in a local variables doesn't count, it gets
+ // A Reference in a local variable doesn't count, it gets
// unreferenced on return.
for (i = 0; i < dfunc->df_varcount; ++i)
{
LPWSTR *out, int *outlen)
{
*outlen = MultiByteToWideChar(cp, flags, in, inlen, 0, 0);
- // Add one one word to avoid a zero-length alloc().
+ // Add one word to avoid a zero-length alloc().
*out = ALLOC_MULT(WCHAR, *outlen + 1);
if (*out != NULL)
{
LPCSTR def, LPBOOL useddef)
{
*outlen = WideCharToMultiByte(cp, flags, in, inlen, NULL, 0, def, useddef);
- // Add one one byte to avoid a zero-length alloc().
+ // Add one byte to avoid a zero-length alloc().
*out = alloc(*outlen + 1);
if (*out != NULL)
{
if (vertical)
{
- // Each windows needs at least 'winminwidth' lines and a separator
+ // Each window needs at least 'winminwidth' lines and a separator
// column.
maxcount = (curwin->w_width + curwin->w_vsep_width
- (p_wiw - p_wmw)) / (p_wmw + 1);
room = height - m;
if (room < 0)
{
- // The room is less then 'winheight', use all space for the
+ // The room is less than 'winheight', use all space for the
// current window.
next_curwin_size = p_wh + room;
room = 0;