diff options
author | bfredl <bjorn.linse@gmail.com> | 2023-03-09 11:06:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-09 11:06:47 +0100 |
commit | 46d4d420e56bb0b4aec696fd8164bffde02d2758 (patch) | |
tree | 0e52864f8126941b511d814aed554bed4cc1cd64 /src/nvim/option.c | |
parent | e17581fa5342c7396385456faa37e78105994ed2 (diff) | |
parent | fe11079721084b3638ae3d8e5266f95d52028fb7 (diff) | |
download | rneovim-46d4d420e56bb0b4aec696fd8164bffde02d2758.tar.gz rneovim-46d4d420e56bb0b4aec696fd8164bffde02d2758.tar.bz2 rneovim-46d4d420e56bb0b4aec696fd8164bffde02d2758.zip |
Merge pull request #22547 from luukvbaal/statusline
perf(statusline): UI elements are always redrawn on K_EVENT
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r-- | src/nvim/option.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c index 5ad2929a91..4e0fbc20f8 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -92,6 +92,7 @@ #include "nvim/spell.h" #include "nvim/spellfile.h" #include "nvim/spellsuggest.h" +#include "nvim/statusline.h" #include "nvim/strings.h" #include "nvim/tag.h" #include "nvim/terminal.h" @@ -2251,8 +2252,13 @@ static char *set_bool_option(const int opt_idx, char *const varp, const int valu ui_call_option_set(cstr_as_string(options[opt_idx].fullname), BOOLEAN_OBJ(*varp)); } - - comp_col(); // in case 'ruler' or 'showcmd' changed + if ((int *)varp == &p_ru || (int *)varp == &p_sc) { + // in case 'ruler' or 'showcmd' changed + comp_col(); + if ((int *)varp == &p_ru) { + win_redr_ruler(curwin); + } + } if (curwin->w_curswant != MAXCOL && (options[opt_idx].flags & (P_CURSWANT | P_RALL)) != 0) { curwin->w_set_curswant = true; |