diff options
author | James McCoy <jamessan@jamessan.com> | 2018-08-23 10:45:58 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-23 10:45:58 -0400 |
commit | dfbb75fdabe3829abd0a1f0f905adc7dc5740d15 (patch) | |
tree | fb3644fcd5566cac85a186513e0ba451505c1f36 /src/nvim/spell.c | |
parent | 012cd35bfbe2c175a31a2fba14cf1bdee6f06e8c (diff) | |
parent | 6c8851be4e5ce8cbd6f224451fae8a0adc292bf6 (diff) | |
download | rneovim-dfbb75fdabe3829abd0a1f0f905adc7dc5740d15.tar.gz rneovim-dfbb75fdabe3829abd0a1f0f905adc7dc5740d15.tar.bz2 rneovim-dfbb75fdabe3829abd0a1f0f905adc7dc5740d15.zip |
Merge pull request #8889 from janlazo/vim-8.0.0999
[RDY] vim-patch:8.0.{999,1041,1043,1044}
Diffstat (limited to 'src/nvim/spell.c')
-rw-r--r-- | src/nvim/spell.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/nvim/spell.c b/src/nvim/spell.c index 1cb679245b..4acbdcc298 100644 --- a/src/nvim/spell.c +++ b/src/nvim/spell.c @@ -1398,13 +1398,14 @@ spell_move_to ( capcol = 0; // For checking first word with a capital skip white space. - if (capcol == 0) - capcol = (int)(skipwhite(line) - line); - else if (curline && wp == curwin) { + if (capcol == 0) { + capcol = (int)getwhitecols(line); + } else if (curline && wp == curwin) { // For spellbadword(): check if first word needs a capital. - col = (int)(skipwhite(line) - line); - if (check_need_cap(lnum, col)) + col = (int)getwhitecols(line); + if (check_need_cap(lnum, col)) { capcol = col; + } // Need to get the line again, may have looked at the previous // one. @@ -2976,7 +2977,7 @@ static bool check_need_cap(linenr_T lnum, colnr_T col) line = get_cursor_line_ptr(); endcol = 0; - if ((int)(skipwhite(line) - line) >= (int)col) { + if (getwhitecols(line) >= (int)col) { // At start of line, check if previous line is empty or sentence // ends there. if (lnum == 1) |