patch 9.0.0175: spell checking for capital not working with trailing space

Problem:    Spell checking for capital not working with trailing space.
Solution:   Do not calculate cap_col at the end of the line. (Christian
            Brabandt, closes #10870, issue #10838)
diff --git a/src/drawline.c b/src/drawline.c
index a435e4e..3a9c7a3 100644
--- a/src/drawline.c
+++ b/src/drawline.c
@@ -2279,7 +2279,9 @@
 		if (has_spell && v >= word_end && v > cur_checked_col)
 		{
 		    spell_attr = 0;
-		    if (c != 0 && (
+		    // do not calculate cap_col at the end of the line or when
+		    // only white space is following
+		    if (c != 0 && (*skipwhite(prev_ptr) != NUL) && (
 # ifdef FEAT_SYN_HL
 				!has_syntax ||
 # endif