mirror of
https://github.com/neovim/neovim.git
synced 2025-09-19 17:58:18 +00:00
tui: Don't use 'pastetoggle' for automatic pasting
Add a new special key that can be used by UIs to toggle the 'paste' option and use it in the TUI instead of the user's 'pastetoggle' value. Close #2843 #2092
This commit is contained in:
@@ -247,6 +247,8 @@ enum key_extra {
|
||||
, KE_FOCUSGAINED /* focus gained */
|
||||
, KE_FOCUSLOST /* focus lost */
|
||||
, KE_EVENT // event
|
||||
, KE_PASTE // special key to toggle the 'paste' option.
|
||||
// sent only by UIs
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -437,6 +439,7 @@ enum key_extra {
|
||||
|
||||
#define K_CURSORHOLD TERMCAP2KEY(KS_EXTRA, KE_CURSORHOLD)
|
||||
#define K_EVENT TERMCAP2KEY(KS_EXTRA, KE_EVENT)
|
||||
#define K_PASTE TERMCAP2KEY(KS_EXTRA, KE_PASTE)
|
||||
|
||||
/* Bits for modifier mask */
|
||||
/* 0x01 cannot be used, because the modifier must be 0x02 or higher */
|
||||
|
Reference in New Issue
Block a user