diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-05-10 07:58:58 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-10 07:58:58 +0800 |
commit | 9aa5647e686e5420e5b9b51828ec7d55631f98ed (patch) | |
tree | 81172459aa5b8ac5c1f2e4e0b322e70267712ecd /src/nvim/terminal.c | |
parent | c55867b46d6758c4ff2e55d1bfb4cfc163182a12 (diff) | |
download | rneovim-9aa5647e686e5420e5b9b51828ec7d55631f98ed.tar.gz rneovim-9aa5647e686e5420e5b9b51828ec7d55631f98ed.tar.bz2 rneovim-9aa5647e686e5420e5b9b51828ec7d55631f98ed.zip |
vim-patch:8.2.4911: the mode #defines are not clearly named (#18499)
Problem: The mode #defines are not clearly named.
Solution: Prepend MODE_. Renumber them to put the mapped modes first.
https://github.com/vim/vim/commit/249591057b4840785c50e41dd850efb8a8faf435
A hunk from the patch depends on patch 8.2.4861, which hasn't been
ported yet, but that should be easy to notice.
Diffstat (limited to 'src/nvim/terminal.c')
-rw-r--r-- | src/nvim/terminal.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/terminal.c b/src/nvim/terminal.c index 142da8f184..f7d33de4fe 100644 --- a/src/nvim/terminal.c +++ b/src/nvim/terminal.c @@ -381,7 +381,7 @@ void terminal_check_size(Terminal *term) invalidate_terminal(term, -1, -1); } -/// Implements TERM_FOCUS mode. :help Terminal-mode +/// Implements MODE_TERMINAL state. :help Terminal-mode void terminal_enter(void) { buf_T *buf = curbuf; @@ -398,8 +398,8 @@ void terminal_enter(void) int save_state = State; s->save_rd = RedrawingDisabled; - State = TERM_FOCUS; - mapped_ctrl_c |= TERM_FOCUS; // Always map CTRL-C to avoid interrupt. + State = MODE_TERMINAL; + mapped_ctrl_c |= MODE_TERMINAL; // Always map CTRL-C to avoid interrupt. RedrawingDisabled = false; // Disable these options in terminal-mode. They are nonsense because cursor is @@ -1637,7 +1637,7 @@ static int linenr_to_row(Terminal *term, int linenr) static bool is_focused(Terminal *term) { - return State & TERM_FOCUS && curbuf->terminal == term; + return State & MODE_TERMINAL && curbuf->terminal == term; } static char *get_config_string(char *key) |