diff options
author | Gregory Anders <greg@gpanders.com> | 2025-01-14 08:18:59 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-14 08:18:59 -0600 |
commit | f1c45fc7a4a595e460cd245172a5767bddeb09e9 (patch) | |
tree | bf9dd2ffe6acea41c7639828fffef9a8393015fe /src/nvim/optionstr.c | |
parent | 7eabc8899af8b2fed1472165b74f43965282974f (diff) | |
download | rneovim-f1c45fc7a4a595e460cd245172a5767bddeb09e9.tar.gz rneovim-f1c45fc7a4a595e460cd245172a5767bddeb09e9.tar.bz2 rneovim-f1c45fc7a4a595e460cd245172a5767bddeb09e9.zip |
feat(terminal): support theme update notifications (DEC mode 2031) (#31999)
Diffstat (limited to 'src/nvim/optionstr.c')
-rw-r--r-- | src/nvim/optionstr.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nvim/optionstr.c b/src/nvim/optionstr.c index eac9ea02e0..93871905db 100644 --- a/src/nvim/optionstr.c +++ b/src/nvim/optionstr.c @@ -44,6 +44,7 @@ #include "nvim/spellfile.h" #include "nvim/spellsuggest.h" #include "nvim/strings.h" +#include "nvim/terminal.h" #include "nvim/types_defs.h" #include "nvim/vim_defs.h" #include "nvim/window.h" @@ -532,6 +533,15 @@ const char *did_set_background(optset_T *args) check_string_option(&p_bg); init_highlight(false, false); } + + // Notify all terminal buffers that the background color changed so they can + // send a theme update notification + FOR_ALL_BUFFERS(buf) { + if (buf->terminal) { + terminal_notify_theme(buf->terminal, dark); + } + } + return NULL; } |