aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/diff.c8
-rw-r--r--src/nvim/edit.c4
-rw-r--r--src/nvim/ex_cmds.c2
-rw-r--r--src/nvim/hardcopy.c2
-rw-r--r--src/nvim/move.c8
-rw-r--r--src/nvim/normal.c2
-rw-r--r--src/nvim/ops.c2
-rw-r--r--src/nvim/screen.c4
-rw-r--r--src/nvim/spell.c16
9 files changed, 24 insertions, 24 deletions
diff --git a/src/nvim/diff.c b/src/nvim/diff.c
index b8fa3c24a2..35c00c4f23 100644
--- a/src/nvim/diff.c
+++ b/src/nvim/diff.c
@@ -1084,7 +1084,7 @@ void diff_win_options(win_T *wp, int addbuf)
wp->w_p_fdl = 0;
foldUpdateAll(wp);
- // make sure topline is not halfway a fold
+ // make sure topline is not halfway through a fold
changed_window_setting_win(wp);
if (vim_strchr(p_sbo, 'h') == NULL) {
do_cmdline_cmd((char_u *)"set sbo+=hor");
@@ -1160,7 +1160,7 @@ void ex_diffoff(exarg_T *eap)
foldUpdateAll(wp);
- // make sure topline is not halfway a fold
+ // make sure topline is not halfway through a fold
changed_window_setting_win(wp);
// Note: 'sbo' is not restored, it's a global option.
@@ -1511,8 +1511,8 @@ int diff_check(win_T *wp, linenr_T lnum)
// If there is no buffer with zero lines then there is no difference
// any longer. Happens when making a change (or undo) that removes
// the difference. Can't remove the entry here, we might be halfway
- // updating the window. Just report the text as unchanged. Other
- // windows might still show the change though.
+ // through updating the window. Just report the text as unchanged.
+ // Other windows might still show the change though.
if (zero == FALSE) {
return 0;
}
diff --git a/src/nvim/edit.c b/src/nvim/edit.c
index f6ca11761a..03dceaf092 100644
--- a/src/nvim/edit.c
+++ b/src/nvim/edit.c
@@ -766,8 +766,8 @@ edit (
#ifdef UNIX
do_intr:
#endif
- /* when 'insertmode' set, and not halfway a mapping, don't leave
- * Insert mode */
+ // when 'insertmode' set, and not halfway through a mapping, don't leave
+ // Insert mode
if (goto_im()) {
if (got_int) {
(void)vgetc(); /* flush all buffers */
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c
index 763a2d6212..b1a7044565 100644
--- a/src/nvim/ex_cmds.c
+++ b/src/nvim/ex_cmds.c
@@ -3093,7 +3093,7 @@ do_ecmd (
if (!skip_redraw) {
n = p_so;
if (topline == 0 && command == NULL)
- p_so = 999; /* force cursor halfway the window */
+ p_so = 999; // force cursor to be vertically centered in the window
update_topline();
curwin->w_scbind_pos = curwin->w_topline;
p_so = n;
diff --git a/src/nvim/hardcopy.c b/src/nvim/hardcopy.c
index 92abcbada4..70ec3678c8 100644
--- a/src/nvim/hardcopy.c
+++ b/src/nvim/hardcopy.c
@@ -827,7 +827,7 @@ static colnr_T hardcopy_line(prt_settings_T *psettings, int page_line, prt_pos_T
prt_line_number(psettings, page_line, ppos->file_line);
ppos->ff = FALSE;
} else {
- /* left over from wrap halfway a tab */
+ // left over from wrap halfway through a tab
print_pos = ppos->print_pos;
tab_spaces = ppos->lead_spaces;
}
diff --git a/src/nvim/move.c b/src/nvim/move.c
index 40f301e595..1ba064c65f 100644
--- a/src/nvim/move.c
+++ b/src/nvim/move.c
@@ -1629,10 +1629,10 @@ void scroll_cursor_bot(int min_scroll, int set_topbot)
curwin->w_valid |= VALID_TOPLINE;
}
-/*
- * Recompute topline to put the cursor halfway the window
- * If "atend" is TRUE, also put it halfway at the end of the file.
- */
+/// Recompute topline to put the cursor halfway across the window
+///
+/// @param atend if TRUE, also put the cursor halfway to the end of the file.
+///
void scroll_cursor_halfway(int atend)
{
int above = 0;
diff --git a/src/nvim/normal.c b/src/nvim/normal.c
index 5b138f2d88..f140922082 100644
--- a/src/nvim/normal.c
+++ b/src/nvim/normal.c
@@ -6954,7 +6954,7 @@ static void nv_esc(cmdarg_T *cap)
MSG(_("Type :quit<Enter> to exit Vim"));
/* Don't reset "restart_edit" when 'insertmode' is set, it won't be
- * set again below when halfway a mapping. */
+ * set again below when halfway through a mapping. */
if (!p_im)
restart_edit = 0;
if (cmdwin_type != 0) {
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index 90fc89ee21..90cb482ec5 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -517,7 +517,7 @@ static void block_insert(oparg_T *oap, char_u *s, int b_insert, struct block_def
if (has_mbyte && spaces > 0) {
int off;
- // Avoid starting halfway a multi-byte character.
+ // Avoid starting halfway through a multi-byte character.
if (b_insert) {
off = (*mb_head_off)(oldp, oldp + offset + spaces);
} else {
diff --git a/src/nvim/screen.c b/src/nvim/screen.c
index 8f4f894128..6e4c17f49e 100644
--- a/src/nvim/screen.c
+++ b/src/nvim/screen.c
@@ -1345,7 +1345,7 @@ static void win_update(win_T *wp)
/*
* Update a line when it is in an area that needs updating, when it
* has changes or w_lines[idx] is invalid.
- * bot_start may be halfway a wrapped line after using
+ * bot_start may be halfway through a wrapped line after using
* win_del_lines(), check if the current line includes it.
* When syntax folding is being used, the saved syntax states will
* already have been updated, we can't see where the syntax state is
@@ -4037,7 +4037,7 @@ win_line (
/* DBCS: Put second byte in the second screen char. */
ScreenLines[off] = mb_c & 0xff;
++vcol;
- /* When "tocol" is halfway a character, set it to the end of
+ /* When "tocol" is halfway through a character, set it to the end of
* the character, otherwise highlighting won't stop. */
if (tocol == vcol)
++tocol;
diff --git a/src/nvim/spell.c b/src/nvim/spell.c
index bb995fe3c2..3753d9c85b 100644
--- a/src/nvim/spell.c
+++ b/src/nvim/spell.c
@@ -1631,9 +1631,9 @@ static void find_word(matchinf_T *mip, int mode)
mip->mi_compoff = wlen;
find_word(mip, FIND_KEEPCOMPOUND);
-#if 0 // Disabled, a prefix must not appear halfway a compound word,
- // unless the COMPOUNDPERMITFLAG is used and then it can't be a
- // postponed prefix.
+#if 0 // Disabled, a prefix must not appear halfway through a compound
+ // word, unless the COMPOUNDPERMITFLAG is used, in which case it
+ // can't be a postponed prefix.
if (!slang->sl_nobreak || mip->mi_result == SP_BAD) {
// Check for following word with prefix.
mip->mi_compoff = c;
@@ -2081,7 +2081,7 @@ spell_move_to (
return 0;
// Start looking for bad word at the start of the line, because we can't
- // start halfway a word, we don't know where it starts or ends.
+ // start halfway through a word, we don't know where it starts or ends.
//
// When searching backwards, we continue in the line to find the last
// bad word (in the cursor line: before the cursor).
@@ -5428,8 +5428,8 @@ static int spell_read_dic(spellinfo_T *spin, char_u *fname, afffile_T *affile)
if (line[0] == '#' || line[0] == '/')
continue; // comment line
- // Remove CR, LF and white space from the end. White space halfway
- // the word is kept to allow e.g., "et al.".
+ // Remove CR, LF and white space from the end. White space halfway through
+ // the word is kept to allow multi-word terms like "et al.".
l = (int)STRLEN(line);
while (l > 0 && line[l - 1] <= ' ')
--l;
@@ -9740,7 +9740,7 @@ static void suggest_trie_walk(suginfo_T *su, langp_T *lp, char_u *fword, bool so
// Try word split and/or compounding.
if ((sp->ts_fidx >= sp->ts_fidxtry || fword_ends)
- // Don't split halfway a character.
+ // Don't split in the middle of a character
&& (!has_mbyte || sp->ts_tcharlen == 0)
) {
bool try_compound;
@@ -12275,7 +12275,7 @@ soundalike_score (
int score = 0;
// Adding/inserting "*" at the start (word starts with vowel) shouldn't be
- // counted so much, vowels halfway the word aren't counted at all.
+ // counted so much, vowels in the middle of the word aren't counted at all.
if ((*badsound == '*' || *goodsound == '*') && *badsound != *goodsound) {
if ((badsound[0] == NUL && goodsound[1] == NUL)
|| (goodsound[0] == NUL && badsound[1] == NUL))