summaryrefslogtreecommitdiffstats
path: root/src/structs.h
diff options
context:
space:
mode:
authorLuuk van Baal <luukvbaal@gmail.com>2023-05-27 22:22:10 +0100
committerBram Moolenaar <Bram@vim.org>2023-05-27 22:22:10 +0100
commit30805a1aba0067cf0087f9a0e5c184562433e2e7 (patch)
treefb230c3a843711b3cb0369ef275f3377a8154c09 /src/structs.h
parent1ba0b9e36f36926a7675b31efeda7d3e495c9157 (diff)
patch 9.0.1585: weird use of static variables for spell checkingv9.0.1585
Problem: Weird use of static variables for spell checking. Solution: Move the variables to a structure and pass them from win_update() to win_line(). (Luuk van Baal, closes #12448)
Diffstat (limited to 'src/structs.h')
-rw-r--r--src/structs.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/structs.h b/src/structs.h
index 5df8f841a0..3a32bc595d 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -4870,3 +4870,18 @@ typedef struct
// message (when it is not NULL).
char *os_errbuf;
} optset_T;
+
+/*
+ * Spell checking variables passed from win_update() to win_line().
+ */
+typedef struct {
+ int spv_has_spell; // drawn window has spell checking
+#ifdef FEAT_SPELL
+ int spv_unchanged; // not updating for changed text
+ int spv_checked_col; // column in "checked_lnum" up to
+ // which there are no spell errors
+ linenr_T spv_checked_lnum; // line number for "checked_col"
+ int spv_cap_col; // column to check for Cap word
+ linenr_T spv_capcol_lnum; // line number for "cap_col"
+#endif
+} spellvars_T;