| Commit message (Collapse) | Author | Age |
... | |
| |
|
|
|
| |
Also make it work better on a multiline selection.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: getregion() can be improved (after v9.1.120)
Solution: change getregion() implementation to use pos as lists and
one optional {opt} dictionary (Shougo Matsushita)
Note: The following is a breaking change!
Currently, the getregion() function (included as of patch v9.1.120) takes
3 arguments: the first 2 arguments are strings, describing a position,
arg3 is the type string.
However, that is slightly inflexible, there is no way to specify
additional arguments. So let's instead change the function signature to:
getregion(pos1, pos2 [, {Dict}]) where both pos1 and pos2 are lists.
This is slightly cleaner, and gives us the flexibility to specify
additional arguments as key/value pairs to the optional Dict arg.
Now it supports the "type" key to specify the selection type
(characterwise, blockwise or linewise) and now in addition one can also
define the selection type, independently of what the 'selection' option
actually is.
Technically, this is a breaking change, but since the getregion()
Vimscript function is still quite new, this should be fine.
closes: vim/vim#14090
https://github.com/vim/vim/commit/19b718828d8d5fab52d94c6cdba694641879ab38
Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
|
|
|
|
|
| |
Validate the channel number before responding to an OSC 10/11 request.
When used with nvim_open_term, the channel number is unset (since there
is no process on the other side of the PTY).
|
| |
|
|
|
|
|
|
| |
Problem: When terminal is autocloses, it blocks other events, like
`BufEnter`.
Solution: Use `nested = true`.
|
|
|
|
|
|
| |
There is now a new tmux 3.4 release that queries background color from
the parent terminal if background is not set in tmux, so removing the
passthrough still works when background is not set in tmux, and fixes
the incorrect detection when background is set in tmux.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Co-authored-by: Gregory Anders <greg@gpanders.com>
Co-authored-by: WillLillis <wlillis@umass.edu>
|
| |
|
|
|
|
|
|
|
|
| |
Comparing against the old value before setting matched the original
C implementation, but there is no reason to use this restriction. In
particular, this inhibits using OptionSet to determine when the option
was set. If users need to handle a case where the option _changed_, it
is easy to do so in an OptionSet autocommand using v:option_new and
v:option_old (and friends).
|
|
|
|
|
| |
This ensures that any OptionSet autocommands will fire when the value is
changed.
|
| |
|
|
|
| |
Wrap the query with passthrough sequence
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
The OptionSet autocommand does not fire until Vim has finished starting,
so setting 'background' before the VimEnter event would not fire the
OptionSet event. The prior implementation also waited until VimEnter to
set 'background', so this was a regression introduced when moving
background detection into Lua.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes an error that can occur in certain pathological cases when
the autocommand fires at just the right time such that it attempts to
close the timer after the timer has already exited, but before the
scheduled callback has fired.
We now let the timer continue to run even when the autocommand deletes
itself to avoid having to repeat the cleanup code multiple times. There
is no harm in letting the timer execute if the autocommand does not
exist, as the pcall will catch the error.
|
| |
|
|
Move default mappings and autocommands into a separate module and add
comments and docstrings to document each of the defaults.
|