aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
authorDaniel Steinberg <dstein64@users.noreply.github.com>2024-01-15 11:12:07 -0500
committerGitHub <noreply@github.com>2024-01-15 10:12:07 -0600
commit7589336120a258cf75134a5243b2f6b1926ac85b (patch)
treeec4ee3d859c0686913e552e84bb6c857ee8f1e85 /runtime/doc
parent9c202b9392f3d42618cc576aab00a50ed2f7bdeb (diff)
downloadrneovim-7589336120a258cf75134a5243b2f6b1926ac85b.tar.gz
rneovim-7589336120a258cf75134a5243b2f6b1926ac85b.tar.bz2
rneovim-7589336120a258cf75134a5243b2f6b1926ac85b.zip
feat(terminal): respond to OSC background and foreground request (#17197)
The motivation for this update is Issue #15365, where background=light is not properly set for Nvim running from an Nvim :terminal. This can be encountered when e.g., opening a terminal to make git commits, which opens EDITOR=nvim in the nested terminal. Under the implementation of this commit, the OSC response always indicates a black or white foreground/background. While this may not reflect the actual foreground/background color, it permits 'background' to be retained for a nested Nvim instance running in the terminal emulator. The behaviour matches Vim.
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/news.txt2
-rw-r--r--runtime/doc/vim_diff.txt6
2 files changed, 8 insertions, 0 deletions
diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt
index cb70c81191..7743f5981a 100644
--- a/runtime/doc/news.txt
+++ b/runtime/doc/news.txt
@@ -287,6 +287,8 @@ The following new APIs and features were added.
• Terminal buffers emit a |TermRequest| autocommand event when the child
process emits an OSC or DCS control sequence.
+• Terminal buffers respond to OSC background and foreground requests. |default-autocmds|
+
==============================================================================
CHANGED FEATURES *news-changed*
diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt
index 279fdd646f..46550f42b7 100644
--- a/runtime/doc/vim_diff.txt
+++ b/runtime/doc/vim_diff.txt
@@ -145,6 +145,12 @@ nvim_terminal:
- BufReadCmd: Treats "term://" buffers as |terminal| buffers. |terminal-start|
- TermClose: A |terminal| buffer started with no arguments (which thus uses
'shell') and which exits with no error is closed automatically.
+- TermRequest: The terminal emulator responds to OSC background and foreground
+ requests, indicating (1) a black background and white foreground when Nvim
+ option 'background' is "dark" or (2) a white background and black foreground
+ when 'background' is "light". While this may not reflect the actual
+ foreground/background color, it permits 'background' to be retained for a
+ nested Nvim instance running in the terminal emulator.
nvim_cmdwin:
- CmdwinEnter: Limits syntax sync to maxlines=1 in the |cmdwin|.