diff options
Diffstat (limited to 'src')
58 files changed, 109 insertions, 107 deletions
diff --git a/src/alloc.c b/src/alloc.c index 84a1124f3..20df46c00 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -236,7 +236,7 @@ lalloc(size_t size, int message) // 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. diff --git a/src/blowfish.c b/src/blowfish.c index 4502a1c5d..4f6ce01c1 100644 --- a/src/blowfish.c +++ b/src/blowfish.c @@ -651,7 +651,7 @@ crypt_blowfish_init( 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) diff --git a/src/buffer.c b/src/buffer.c index cbb57efa5..5e41e644f 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -1823,7 +1823,7 @@ enter_buffer(buf_T *buf) 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; @@ -5031,7 +5031,7 @@ build_stl_str_hl( 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) { diff --git a/src/cindent.c b/src/cindent.c index 42b46e401..9f1db03c5 100644 --- a/src/cindent.c +++ b/src/cindent.c @@ -1223,7 +1223,7 @@ cin_isfuncdecl( 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; @@ -1792,7 +1792,7 @@ parse_cino(buf_T *buf) 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 @@ -1804,11 +1804,11 @@ parse_cino(buf_T *buf) // 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. diff --git a/src/clipboard.c b/src/clipboard.c index c0c21aeb6..38596f589 100644 --- a/src/clipboard.c +++ b/src/clipboard.c @@ -567,7 +567,7 @@ clip_get_word_boundaries(Clipboard_T *cb, int row, int col) 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) @@ -1030,7 +1030,7 @@ clip_copy_modeless_selection(int both UNUSED) 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); @@ -1140,7 +1140,7 @@ clip_copy_modeless_selection(int both UNUSED) bufp); } } - // Skip right halve of double-wide character. + // Skip right half of double-wide character. if (ScreenLines[off + i + 1] == 0) ++i; } diff --git a/src/diff.c b/src/diff.c index 45c5e0b9d..e9367b568 100644 --- a/src/diff.c +++ b/src/diff.c @@ -693,11 +693,11 @@ diff_redraw( 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); } @@ -1595,7 +1595,7 @@ ex_diffoff(exarg_T *eap) 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"); } diff --git a/src/drawline.c b/src/drawline.c index 7125b800f..8a042ed3e 100644 --- a/src/drawline.c +++ b/src/drawline.c @@ -2258,7 +2258,7 @@ win_line( // 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; @@ -2938,7 +2938,7 @@ win_line( #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; } diff --git a/src/edit.c b/src/edit.c index 9ff1c184e..f4e9327b6 100644 --- a/src/edit.c +++ b/src/edit.c @@ -1657,8 +1657,8 @@ decodeModifyOtherKeys(int c) */ 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; diff --git a/src/ex_cmds.c b/src/ex_cmds.c index ff978ad66..8595e8be0 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -3378,7 +3378,7 @@ ex_append(exarg_T *eap) // "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) ? diff --git a/src/ex_docmd.c b/src/ex_docmd.c index ab0a146fb..20b24572c 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -3744,7 +3744,7 @@ find_ex_command( 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; @@ -6977,7 +6977,7 @@ do_exedit( || 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), diff --git a/src/findfile.c b/src/findfile.c index ab5977697..d3de9fc71 100644 --- a/src/findfile.c +++ b/src/findfile.c @@ -749,7 +749,7 @@ vim_findfile(void *search_ctx_arg) // 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; @@ -1376,7 +1376,7 @@ ff_check_visited( 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)) { diff --git a/src/fold.c b/src/fold.c index d4a626753..7d993f70f 100644 --- a/src/fold.c +++ b/src/fold.c @@ -2513,7 +2513,7 @@ foldUpdateIEMSRecurse( */ 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; diff --git a/src/getchar.c b/src/getchar.c index c3573547a..102eb2f16 100644 --- a/src/getchar.c +++ b/src/getchar.c @@ -76,7 +76,7 @@ static int KeyNoremap = 0; // remapping flags // 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 @@ -941,7 +941,7 @@ noremap_keys(void) * * 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. @@ -3457,7 +3457,7 @@ vgetorpeek(int advance) 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 @@ -490,7 +490,7 @@ gui_init(void) 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. @@ -1371,10 +1371,10 @@ gui_update_cursor( #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; } @@ -2188,7 +2188,7 @@ gui_screenchar( { 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; @@ -3074,7 +3074,7 @@ gui_wait_for_chars(long wtime, int tb_change_cnt) 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); @@ -3277,7 +3277,7 @@ button_set: * 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) { @@ -5376,7 +5376,7 @@ gui_do_findrepl( // 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; diff --git a/src/gui_athena.c b/src/gui_athena.c index f4aafcd94..4da832b22 100644 --- a/src/gui_athena.c +++ b/src/gui_athena.c @@ -216,7 +216,7 @@ gui_athena_scroll_cb_scroll( 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); diff --git a/src/gui_gtk.c b/src/gui_gtk.c index 2ea7a5e02..08290a56f 100644 --- a/src/gui_gtk.c +++ b/src/gui_gtk.c @@ -2242,7 +2242,7 @@ find_replace_dialog_create(char_u *arg, int do_replace) 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) diff --git a/src/gui_motif.c b/src/gui_motif.c index d79a414be..1d95651fb 100644 --- a/src/gui_motif.c +++ b/src/gui_motif.c @@ -2768,7 +2768,7 @@ gui_mch_dialog( // 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) diff --git a/src/gui_photon.c b/src/gui_photon.c index c89d78105..ea8e5e463 100644 --- a/src/gui_photon.c +++ b/src/gui_photon.c @@ -487,7 +487,7 @@ gui_ph_handle_keyboard(PtWidget_t *widget, void *data, PtCallbackInfo_t *info) 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; } diff --git a/src/gui_w32.c b/src/gui_w32.c index b879aa3c8..4edce2e29 100644 --- a/src/gui_w32.c +++ b/src/gui_w32.c @@ -3041,7 +3041,7 @@ get_scroll_flags(void) 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)) @@ -5740,7 +5740,7 @@ GetCompositionString_inUCS2(HIMC hIMC, DWORD GCS, int *lenp) 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 @@ -5757,7 +5757,7 @@ GetCompositionString_inUCS2(HIMC hIMC, DWORD GCS, int *lenp) 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); @@ -7390,8 +7390,8 @@ add_dialog_element( *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 } diff --git a/src/gui_xmebw.c b/src/gui_xmebw.c index 3387fbe0b..7ffa6f3fb 100644 --- a/src/gui_xmebw.c +++ b/src/gui_xmebw.c @@ -970,7 +970,7 @@ set_size(XmEnhancedButtonWidget newtb) } 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. } diff --git a/src/if_python.c b/src/if_python.c index a27098245..1b7ff762f 100644 --- a/src/if_python.c +++ b/src/if_python.c @@ -674,7 +674,7 @@ python_runtime_link_init(char *libname, int verbose) # 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()) { @@ -1461,7 +1461,7 @@ LineToString(const char *str) 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); diff --git a/src/if_python3.c b/src/if_python3.c index 4944ab813..db88527a5 100644 --- a/src/if_python3.c +++ b/src/if_python3.c @@ -766,7 +766,7 @@ py3_runtime_link_init(char *libname, int verbose) # 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()) { diff --git a/src/if_xcmdsrv.c b/src/if_xcmdsrv.c index 901afc467..c814f213d 100644 --- a/src/if_xcmdsrv.c +++ b/src/if_xcmdsrv.c @@ -345,7 +345,7 @@ serverChangeRegisteredWindow( 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); diff --git a/src/main.c b/src/main.c index 6943c2f79..53322498c 100644 --- a/src/main.c +++ b/src/main.c @@ -247,7 +247,7 @@ main 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&"); diff --git a/src/memline.c b/src/memline.c index 119861e5d..a07274646 100644 --- a/src/memline.c +++ b/src/memline.c @@ -4718,7 +4718,7 @@ findswapname( * 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) diff --git a/src/menu.c b/src/menu.c index 2cd3270fe..c0a1f3a71 100644 --- a/src/menu.c +++ b/src/menu.c @@ -582,7 +582,7 @@ add_menu_path( 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; @@ -997,7 +997,7 @@ remove_menu( // 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 @@ -1018,7 +1018,7 @@ remove_menu( { // 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; diff --git a/src/message.c b/src/message.c index 8992de013..7e98d0b99 100644 --- a/src/message.c +++ b/src/message.c @@ -1363,7 +1363,7 @@ hit_return_msg(void) { 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) diff --git a/src/misc1.c b/src/misc1.c index ad26ab37a..a8bc08e35 100644 --- a/src/misc1.c +++ b/src/misc1.c @@ -371,7 +371,7 @@ plines_win_nofill( 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; diff --git a/src/move.c b/src/move.c index 64b12963c..b8e8780aa 100644 --- a/src/move.c +++ b/src/move.c @@ -1152,7 +1152,7 @@ curs_columns( } 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) @@ -1164,7 +1164,7 @@ curs_columns( } 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; diff --git a/src/option.c b/src/option.c index 739b29adf..9d596e41c 100644 --- a/src/option.c +++ b/src/option.c @@ -1774,7 +1774,7 @@ do_set( 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 @@ -3139,7 +3139,7 @@ set_bool_option( } } - // 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) { diff --git a/src/os_amiga.c b/src/os_amiga.c index 18f01928a..5bf088b96 100644 --- a/src/os_amiga.c +++ b/src/os_amiga.c @@ -153,7 +153,7 @@ mch_write(char_u *p, int len) mch_inchar( char_u *buf, int maxlen, - long time, // milli seconds + long time, // milliseconds int tb_change_cnt) { int len; diff --git a/src/os_mac.h b/src/os_mac.h index 652460915..dbc0086e0 100644 --- a/src/os_mac.h +++ b/src/os_mac.h @@ -7,7 +7,7 @@ */ // 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) diff --git a/src/os_mac_conv.c b/src/os_mac_conv.c index 734f8f6c9..211b23531 100644 --- a/src/os_mac_conv.c +++ b/src/os_mac_conv.c @@ -258,7 +258,7 @@ enc2macroman( kCFStringEncodingMacRoman, 0, // no lossy conversion 0, // not external representation (since vim - // handles this internally + // handles this internally) to, maxtolen, &l)) { CFRelease(cfstr); diff --git a/src/os_mswin.c b/src/os_mswin.c index b6393db5a..26042b498 100644 --- a/src/os_mswin.c +++ b/src/os_mswin.c @@ -1907,7 +1907,7 @@ HWND message_window = 0; // window that's handling messages # 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 @@ -2375,7 +2375,7 @@ serverSendToVim( 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; diff --git a/src/os_unix.c b/src/os_unix.c index 1c00f2279..77f35db95 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -3165,7 +3165,7 @@ executable_file(char_u *name) // 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) { diff --git a/src/os_win32.c b/src/os_win32.c index 7234fe8e2..b0ff1bb55 100644 --- a/src/os_win32.c +++ b/src/os_win32.c @@ -2187,7 +2187,7 @@ executable_exists(char *name, char_u **path, int use_path, int use_pathext) } } - // 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) @@ -7750,7 +7750,7 @@ fix_arg_enc(void) // 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. diff --git a/src/os_win32.h b/src/os_win32.h index abe95b5fe..32e29ef7d 100644 --- a/src/os_win32.h +++ b/src/os_win32.h @@ -71,7 +71,7 @@ #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 diff --git a/src/quickfix.c b/src/quickfix.c index d0f4199c9..c007a9c95 100644 --- a/src/quickfix.c +++ b/src/quickfix.c @@ -4537,7 +4537,7 @@ qf_buf_add_line( 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); diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c index 4d7d553bd..0a07edb5a 100644 --- a/src/regexp_nfa.c +++ b/src/regexp_nfa.c @@ -2334,7 +2334,7 @@ nfa_regpiece(void) // 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) @@ -4972,7 +4972,7 @@ addstate_here( // 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; diff --git a/src/screen.c b/src/screen.c index 695318b89..320811bff 100644 --- a/src/screen.c +++ b/src/screen.c @@ -614,9 +614,9 @@ screen_line( } // 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) @@ -1524,8 +1524,8 @@ screen_puts_len( 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 @@ -1653,9 +1653,9 @@ screen_puts_len( #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 @@ -2376,9 +2376,9 @@ screen_fill( #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); diff --git a/src/scriptfile.c b/src/scriptfile.c index 129d4d66d..9c8f1ef84 100644 --- a/src/scriptfile.c +++ b/src/scriptfile.c @@ -1307,7 +1307,7 @@ do_source( 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) diff --git a/src/spell.c b/src/spell.c index 9b2d3e89f..857a79344 100644 --- a/src/spell.c +++ b/src/spell.c @@ -1501,7 +1501,7 @@ spell_move_to( /* * 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. */ @@ -3260,7 +3260,7 @@ spell_soundfold_sal(slang_T *slang, char_u *inword, char_u *res) 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) { @@ -3551,7 +3551,7 @@ spell_soundfold_wsal(slang_T *slang, char_u *inword, char_u *res) && 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; @@ -4033,7 +4033,7 @@ spell_dump_compl( 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 diff --git a/src/spellfile.c b/src/spellfile.c index d85432c25..14ea7ab0d 100644 --- a/src/spellfile.c +++ b/src/spellfile.c @@ -4920,7 +4920,7 @@ write_vim_spell(spellinfo_T *spin, char_u *fname) // // 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 @@ -5720,7 +5720,7 @@ sug_filltable( ++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; diff --git a/src/spellsuggest.c b/src/spellsuggest.c index 255f94de0..f21d55f62 100644 --- a/src/spellsuggest.c +++ b/src/spellsuggest.c @@ -112,7 +112,7 @@ typedef struct suggest_S #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 diff --git a/src/strings.c b/src/strings.c index 3dd685695..52cf12115 100644 --- a/src/strings.c +++ b/src/strings.c @@ -171,7 +171,7 @@ vim_strsave_shellescape(char_u *string, int do_special, int do_newline) // 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 diff --git a/src/term.c b/src/term.c index e97ec2c4d..4757d852e 100644 --- a/src/term.c +++ b/src/term.c @@ -4460,7 +4460,7 @@ static int orig_topfill = 0; #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). */ diff --git a/src/terminal.c b/src/terminal.c index 8f80f9fa2..a88e4bc0f 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -1591,7 +1591,7 @@ term_job_running_check(term_T *term, int check_job_status) { 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) diff --git a/src/testdir/test_debugger.vim b/src/testdir/test_debugger.vim index 6f01917ed..e305033eb 100644 --- a/src/testdir/test_debugger.vim +++ b/src/testdir/test_debugger.vim @@ -948,7 +948,7 @@ func Test_Backtrace_DefFunction() 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']) diff --git a/src/testdir/test_source.vim b/src/testdir/test_source.vim index 559208ae0..8f8e9632a 100644 --- a/src/testdir/test_source.vim +++ b/src/testdir/test_source.vim @@ -69,7 +69,7 @@ func Test_source_ignore_shebang() 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 = '' diff --git a/src/textformat.c b/src/textformat.c index 58ba0abca..920db4082 100644 --- a/src/textformat.c +++ b/src/textformat.c @@ -527,7 +527,7 @@ same_leader( // 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) { diff --git a/src/userfunc.c b/src/userfunc.c index 8f6629174..e1028e772 100644 --- a/src/userfunc.c +++ b/src/userfunc.c @@ -1035,7 +1035,7 @@ get_function_body( 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"); diff --git a/src/version.c b/src/version.c index 658d9be04..7dd9b49eb 100644 --- a/src/version.c +++ b/src/version.c @@ -750,6 +750,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 3914, +/**/ 3913, /**/ 3912, @@ -1012,7 +1012,7 @@ extern int (*dyn_libintl_wputenv)(const wchar_t *envstring); #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 diff --git a/src/vim9.h b/src/vim9.h index a79ffb5af..d2c23be01 100644 --- a/src/vim9.h +++ b/src/vim9.h @@ -703,7 +703,7 @@ struct cctx_S { 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 diff --git a/src/vim9cmds.c b/src/vim9cmds.c index 4e5336cf2..d3411540f 100644 --- a/src/vim9cmds.c +++ b/src/vim9cmds.c @@ -840,7 +840,7 @@ compile_for(char_u *arg_start, cctx_T *cctx) 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 diff --git a/src/vim9execute.c b/src/vim9execute.c index 9814f2514..fd5363080 100644 --- a/src/vim9execute.c +++ b/src/vim9execute.c @@ -544,7 +544,7 @@ handle_closure_in_use(ectx_T *ectx, int free_arguments) 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) { diff --git a/src/winclip.c b/src/winclip.c index db88e6787..560759efe 100644 --- a/src/winclip.c +++ b/src/winclip.c @@ -147,7 +147,7 @@ MultiByteToWideChar_alloc(UINT cp, DWORD flags, 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) { @@ -167,7 +167,7 @@ WideCharToMultiByte_alloc(UINT cp, DWORD flags, 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) { diff --git a/src/window.c b/src/window.c index 4ee75c1a7..ca35e5bc8 100644 --- a/src/window.c +++ b/src/window.c @@ -1555,7 +1555,7 @@ make_windows( 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); @@ -2109,7 +2109,7 @@ win_equal_rec( 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; |