aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/screen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/screen.c')
-rw-r--r--src/nvim/screen.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c
index ec48bf5dcf..092820321c 100644
--- a/src/nvim/screen.c
+++ b/src/nvim/screen.c
@@ -2460,9 +2460,10 @@ win_line (
ptr = line;
if (has_spell) {
- /* For checking first word with a capital skip white space. */
- if (cap_col == 0)
- cap_col = (int)(skipwhite(line) - line);
+ // For checking first word with a capital skip white space.
+ if (cap_col == 0) {
+ cap_col = (int)getwhitecols(line);
+ }
/* To be able to spell-check over line boundaries copy the end of the
* current line into nextline[]. Above the start of the next line was