diff options
author | bfredl <bjorn.linse@gmail.com> | 2022-10-05 21:50:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-05 21:50:12 +0200 |
commit | 6ae4a6e0711035a8a0801dd6fdb545e020bccd70 (patch) | |
tree | 0e76ac339ab041a087a623979e8218ec9223d8f1 /src/nvim/option.c | |
parent | ede85dda2ee23820481d38d0def2d2c83da4e43e (diff) | |
parent | 7746f641b89d1d80b2121980f83ae1f322c30e89 (diff) | |
download | rneovim-6ae4a6e0711035a8a0801dd6fdb545e020bccd70.tar.gz rneovim-6ae4a6e0711035a8a0801dd6fdb545e020bccd70.tar.bz2 rneovim-6ae4a6e0711035a8a0801dd6fdb545e020bccd70.zip |
Merge pull request #20374 from bfredl/notype
screen: refactor old curwin-heavy logic and graduate "msgsep" feature
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r-- | src/nvim/option.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c index e7d0b171f6..4a93fddc1b 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -147,6 +147,13 @@ typedef enum { # include "option.c.generated.h" #endif +void set_init_tablocal(void) +{ + // susy baka: cmdheight calls itself OPT_GLOBAL but is really tablocal! + int ch_idx = findoption("cmdheight"); + p_ch = (long)options[ch_idx].def_val; +} + /// Initialize the options, first part. /// /// Called only once from main(), just after creating the first buffer. @@ -2634,9 +2641,8 @@ static char *set_num_option(int opt_idx, char_u *varp, long value, char *errbuf, /// Called after an option changed: check if something needs to be redrawn. void check_redraw(uint32_t flags) { - // Careful: P_RCLR and P_RALL are a combination of other P_ flags - bool doclear = (flags & P_RCLR) == P_RCLR; - bool all = ((flags & P_RALL) == P_RALL || doclear); + // Careful: P_RALL is a combination of other P_ flags + bool all = (flags & P_RALL) == P_RALL; if ((flags & P_RSTAT) || all) { // mark all status lines and window bars dirty status_redraw_all(); @@ -2651,9 +2657,7 @@ void check_redraw(uint32_t flags) if (flags & P_RWINONLY) { redraw_later(curwin, UPD_NOT_VALID); } - if (doclear) { - redraw_all_later(UPD_CLEAR); - } else if (all) { + if (all) { redraw_all_later(UPD_NOT_VALID); } } |