mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 14:08:32 +00:00
api: Simplify UI API on mode change
Currently, there are two functions in the UI API that are called when the mode changes: insert_mode() and normal_mode(). These can be folded into a single mode_change() entrypoint which can do whatever it wants based on the mode it is passed, limited to INSERT and NORMAL for now.
This commit is contained in:

committed by
Justin M. Keyes

parent
61e4a32065
commit
fa48fc667a
@@ -24,8 +24,7 @@ struct ui_t {
|
||||
void (*busy_stop)(UI *ui);
|
||||
void (*mouse_on)(UI *ui);
|
||||
void (*mouse_off)(UI *ui);
|
||||
void (*insert_mode)(UI *ui);
|
||||
void (*normal_mode)(UI *ui);
|
||||
void (*mode_change)(UI *ui, int mode);
|
||||
void (*set_scroll_region)(UI *ui, int top, int bot, int left, int right);
|
||||
void (*scroll)(UI *ui, int count);
|
||||
void (*highlight_set)(UI *ui, HlAttrs attrs);
|
||||
|
Reference in New Issue
Block a user