summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/feature.h7
-rw-r--r--src/mbyte.c4
-rw-r--r--src/move.c14
3 files changed, 22 insertions, 3 deletions
diff --git a/src/feature.h b/src/feature.h
index 7231b96bf..50979f04c 100644
--- a/src/feature.h
+++ b/src/feature.h
@@ -515,6 +515,13 @@
#endif
/*
+ * +spell spell checking
+ */
+#if defined(FEAT_NORMAL) || defined(PROTO)
+# define FEAT_SPELL
+#endif
+
+/*
* +builtin_terms Choose one out of the following four:
*
* NO_BUILTIN_TCAPS Do not include any builtin termcap entries (used only
diff --git a/src/mbyte.c b/src/mbyte.c
index 4cd7e96fa..a27649ad2 100644
--- a/src/mbyte.c
+++ b/src/mbyte.c
@@ -754,7 +754,7 @@ codepage_invalid:
apply_autocmds(EVENT_ENCODINGCHANGED, NULL, (char_u *)"", FALSE, curbuf);
#endif
-#ifdef FEAT_SYN_HL
+#ifdef FEAT_SPELL
/* Need to reload spell dictionaries */
spell_reload();
#endif
@@ -2722,7 +2722,7 @@ mb_charlen(str)
return count;
}
-#if defined(FEAT_SYN_HL) || defined(PROTO)
+#if defined(FEAT_SPELL) || defined(PROTO)
/*
* Like mb_charlen() but for a string with specified length.
*/
diff --git a/src/move.c b/src/move.c
index c8a5a2321..dca4f2666 100644
--- a/src/move.c
+++ b/src/move.c
@@ -360,7 +360,7 @@ update_topline()
)
{
dollar_vcol = 0;
- if (curwin->w_skipcol)
+ if (curwin->w_skipcol != 0)
{
curwin->w_skipcol = 0;
redraw_later(NOT_VALID);
@@ -841,6 +841,10 @@ validate_virtcol_win(wp)
{
getvvcol(wp, &wp->w_cursor, NULL, &(wp->w_virtcol), NULL);
wp->w_valid |= VALID_VIRTCOL;
+#ifdef FEAT_SYN_HL
+ if (wp->w_p_cuc)
+ redraw_win_later(wp, SOME_VALID);
+#endif
}
}
@@ -1197,6 +1201,14 @@ curs_columns(scroll)
if (prev_skipcol != curwin->w_skipcol)
redraw_later(NOT_VALID);
+#ifdef FEAT_SYN_HL
+ /* Redraw when w_virtcol changes and 'cursorcolumn' is set, or when w_row
+ * changes and 'cursorline' is set. */
+ if ((curwin->w_p_cuc && (curwin->w_valid & VALID_VIRTCOL) == 0)
+ || (curwin->w_p_cul && (curwin->w_valid & VALID_WROW) == 0))
+ redraw_later(SOME_VALID);
+#endif
+
curwin->w_valid |= VALID_WCOL|VALID_WROW|VALID_VIRTCOL;
}