aboutsummaryrefslogtreecommitdiff
path: root/runtime/plugin/osc52.lua
Commit message (Collapse)AuthorAge
* feat(clipboard)!: use OSC 52 as fallback clipboard provider (#31730)Gregory Anders2024-12-31
| | | | | | | | | | | | | | | We currently enable the OSC 52 clipboard provider by setting g:clipboard when a list of conditions are met, one of which is that $SSH_TTY must be set. We include this condition because often OSC 52 is not the best clipboard provider, so if there are "local" providers available Nvim should prefer those over OSC 52. However, if no other providers are available, Nvim should use OSC 52 even when $SSH_TTY is not set. When a user is in an SSH session then the checks for the other clipboard providers will still (typically) fail, so OSC 52 continues to be enabled by default in SSH sessions. This is marked as a breaking change because there are some cases where OSC 52 wasn't enabled before and is now (or vice versa).
* fix(osc52): do not use 'vim.iter' (#27218)Evgeni Chasnovski2024-01-26
| | | | | Problem: Using 'vim.iter' loads it during startup. Solution: Do not use 'vim.iter'.
* feat(defaults): enable 'termguicolors' by default when supported by terminalGregory Anders2023-12-06
| | | | | | | | | | | | Enable 'termguicolors' automatically when Nvim can detect that truecolor is supported by the host terminal. If $COLORTERM is set to "truecolor" or "24bit", or the terminal's terminfo entry contains capabilities for Tc, RGB, or setrgbf and setrgbb, then we assume that the terminal supports truecolor. Otherwise, the terminal is queried (using both XTGETTCAP and SGR + DECRQSS). If the terminal's response to these queries (if any) indicates that it supports truecolor, then 'termguicolors' is enabled.
* fix(osc52): enable OSC 52 by default in tmux sessions (#26072)Gregory Anders2023-11-16
| | | | | tmux has a set-clipboard option which, when set to 'on', allows applications to set the system clipboard using the usual OSC 52 escape sequence.
* feat(clipboard): enable OSC 52 clipboard provider by default (#26064)Gregory Anders2023-11-16
Use the XTGETTCAP sequence to determine if the host terminal supports the OSC 52 sequence and, if it does, enable the OSC 52 clipboard provider by default. This is only done automatically when all of the following are true: 1. Nvim is running in the TUI 2. 'clipboard' is not set to unnamed or unnamedplus 3. g:clipboard is unset 4. Nvim is running in an SSH connection ($SSH_TTY is set) 5. Nvim is not running inside tmux ($TMUX is unset)