mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 23:31:51 +00:00
vim-patch:9.0.1585: weird use of static variables for spell checking
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 vim/vim#12448)
30805a1aba
This commit is contained in:
@@ -23,6 +23,17 @@ EXTERN kvec_t(WinExtmark) win_extmark_arr INIT(= KV_INITIAL_VALUE);
|
||||
|
||||
EXTERN bool conceal_cursor_used INIT(= false);
|
||||
|
||||
// Spell checking variables passed from win_update() to win_line().
|
||||
typedef struct {
|
||||
bool spv_has_spell; ///< drawn window has spell checking
|
||||
bool 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"
|
||||
} spellvars_T;
|
||||
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "drawline.h.generated.h"
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user