| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
After https://github.com/neovim/neovim/pull/32377 selecting snippets
provided by luals inserted the multi-line text before accepting the
candidates. That's inconsistent with servers who provide `textEdit`
instead of `insertText` and having lines shift up/down while cycling
through the completion candidates is a bit irritating.
Solution:
Use the logic used for `textEdit` snippets also for `insertText`
|
|
|
|
| |
- Fix wrong cursor position with 'listchars' "precedes".
- Always show the '<' truncation character.
|
|
|
|
| |
Having more chars after a double-width char makes it easier to spot the
bug where truncating it causes the pending chars to be lost.
|
| |
|
|
|
|
| |
Co-authored-by: Jaehwang Jung <tomtomjhj@gmail.com>
|
|
|
|
|
|
|
|
| |
Problem: No kind for `:registers/autocmd/augroup` messages. `:registers`
chunks are emitted as separate `msg_show` events.
Solution: Add the `list_cmd` kind to the message. Introduce a new
`msg_ext_skip_flush` variable to set to true around a
group of to be paired message chunks.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Enter does not insert newline with "noselect" when the pum is
visible (lifepillar)
Solution: When Enter is pressed and no complete-item is selected,
ins_compl_prep returns false, and the edit function continues
processing Enter to insert a new line. (glepnir)
fixes: vim/vim#1653
closes: vim/vim#16653
https://github.com/vim/vim/commit/07f0dbe3aa326fdf4d0f1b1cf7d79df89e91fc6e
Co-authored-by: glepnir <glephunter@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Messages preceding a `cmdline_show->prompt` event can not be
distinguished as such when receiving the event. (But since
`msg_show` handlers should be scheduled, one can already check
whether a prompt is active when displaying the message.)
Solution: Rather than add a new kind again, use the `confirm` kind.
Could be seen as slightly misleading where it is more of
a choice rather than a confirmation, but that already applies
to `confirm()` as well...
|
|
|
|
| |
Add a new field `virt_lines_overflow` that enables horizontal scrolling
for virtual lines when set to "scroll".
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PuTTY sets TERM=xterm, but sends ESC[1~ and ESC[4~ for Home/End keys,
which does not match what the 'xterm' terminfo has for khome/kend, so
libtermkeys instead reports them as the original DEC VT220 names.
The VT220 came with a DEC LK201 keyboard which had the following keys in
the area above arrow keys (where PCs now have Ins/Del/Home/End/etc):
┌────────┬────────┬────────┐
│ Find │ Insert │ Re- │
│ │ Here │ move │
├────────┼────────┼────────┤
│ Select │ Prev │ Next │
│ │ Screen │ Screen │
└────────┴────────┴────────┘
These would send ESC[x~ sequences in the expected order:
┌────────┬────────┬────────┐
│ ESC[1~ │ ESC[2~ │ ESC[3~ │
├────────┼────────┼────────┤
│ ESC[4~ │ ESC[5~ │ ESC[6~ │
└────────┴────────┴────────┘
Modern terminals continue to use the same sequences for Ins/Del as well
as PageUp/PageDn. But the VT220 keyboard apparently had no Home/End, and
PuTTY apparently chose to re-purpose the Find/Select key sequences for
Home/End (even though it claims to emulate Xterm and this doesn't match
what actual Xterm does).
So when Home/End are used in Neovim through PuTTY with TERM=xterm (the
default setting), libtermkey finds no match for the received sequences
in the terminfo database and defaults to reporting them as <Find> and
<Select> respectively.
PuTTY is not unique here -- tmux *also* sends ESC[1~ and ESC[4~ after
its internal translation -- but the difference is that 'tmux' terminfo
correctly maps them to Home/End so Neovim recognizes them as such, while
PuTTY defaults to using 'xterm' which uses a different mapping.
This initial patch only allows Neovim to recognize <Find> and <Select>
key codes as themselves, so that the user could manually map them e.g.
using ":imap <Find> <Home>".
Alternatives:
- Using TERM=putty(-256color) would of course be the most correct
solution, but in practice it leads to other minor issues, e.g. the
need to have different PuTTY config profiles for older or non-Linux
systems that lack that terminfo, or tmux's insistence on rendering
italics as reverse.
- Using Neovim through tmux avoids the problem (as tmux recognizes
ESC[1~ on input), but is something that needs to be manually run
every time.
The keycodes.h constants are slightly misnamed because K_SELECT was
already taken for a different purpose.
|
|
|
|
|
|
|
|
| |
Problem: Computing fold levels for an empty buffer (somehow) breaks the
parser state, resulting in a broken highlighter and foldexpr.
Cached foldexpr parser is invalid after filetype has changed.
Solution: Avoid computing fold levels for empty buffer.
Clear cached foldinfos upon `FileType`.
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: after #32458, it may still be possible for `busy_start` UI events to be
emitted without matching `busy_stop`s in the terminal.
Solution: do `terminal_enter`'s cursor visibility check immediately after
setting/restoring State so it occurs before events. This ensures that if pending
escape sequences are processed while in `terminal_enter`, the cursor's initial
visibility is set before `is_focused` is checked by `term_settermprop`.
As a result, we can move the call to `showmode` back to where it was originally.
|
| |
|
|
|
|
|
| |
Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
Co-authored-by: Julian Visser <12615757+justmejulian@users.noreply.github.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: `showmode` in `terminal_enter` may cause `vpeekc` to process events,
which may handle pending escape sequences. If `CSI ? 25 l` is handled to hide
the cursor, it may remain hidden even after leaving terminal mode if both
`terminal_enter` and (indirectly) `showmode` call `ui_busy_start`, as there is
only one matching call to `ui_busy_stop` after leaving terminal mode.
Solution: let `terminal_enter` handle setting the initial visibility of the
cursor before calling `showmode`.
Closes #32456.
This simple solution assumes it isn't possible for e.g. `os_breakcheck` to be
called indirectly by something else before `terminal_enter` initially handles
cursor visibility and after it restores it, which I think is true.
|
|
|
|
|
|
|
|
| |
`command` was already resolved via a `completionItem/resolve` request
but only if `additionalTextEdits` were also present, and the
`resolveSupport` capability wasn't listed.
Closes https://github.com/neovim/neovim/issues/32406
|
|
|
|
|
|
|
|
|
| |
Problem: set winbar on a floating window which only have one row will
cause crash.
Solution: when new floating window only have one room don't copy winbar
from target window"
Fix #19464
|
|
|
|
| |
Co-authored-by: Gregory Anders <greg@gpanders.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
|
|
|
|
| |
Problem: When expanding a completion item that contains a multi-line word, the word is not deleted correctly.
Solution: If the word contains a line break, delete the text from Context.cursor to the current cursor position.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: autotrigger option of vim.lsp.completion.enable() would trigger
all clients, as long as it matched at least one client's
triggerCharacters.
Solution: trigger only the clients with triggerCharacters matching the
character. overtriggering still happens if any client returns
isIncomplete=true (this case is more involved).
Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
|
|
|
|
|
|
| |
Problem: Error thrown when for invalid line number which may be accessed
in an `on_detach` callback at which point line count is
intentionally set to 0.
Solution: Move empty memline check to before line number check.
|
|
|
|
|
|
|
| |
Problem: Number and statuscolumn highlighting for virtual lines does
not take always take on numhl highlights.
Solution: Apply the appropriate numhl highlight to the number/statuscolumn
of virtual lines, fetching the numhl highlight of the line above
for `virt_line_above == false` lines.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
vim-patch:partial:9.1.1084: Unable to persistently ignore events in a window and its buffers
Problem: Unable to persistently ignore events in a window and its buffers.
Solution: Add 'eventignorewin' option to ignore events in a window and buffer
(Luuk van Baal)
Add the window-local 'eventignorewin' option that is analogous to
'eventignore', but applies to a certain window and its buffers. Identify
events that should be allowed in 'eventignorewin', adapt "auto_event"
and "event_tab" to encode this information. Window context is not passed
onto apply_autocmds_group(), and when to ignore an event is a bit
ambiguous when "buf" is not "curbuf", rather than a large refactor, only
ignore an event when all windows into "buf" are ignoring the event.
https://github.com/vim/vim/commit/b7147f8236c962cd74d1ce028d9106f1c449ea6c
vim-patch:9.1.1102: tests: Test_WinScrolled_Resized_eiw() uses wrong filename
Problem: tests: Test_WinScrolled_Resized_eiw() uses wrong filename
(Luuk van Baal, after v9.1.1084)
Solution: Rename the filename to something more unique
https://github.com/vim/vim/commit/bfc7719e48ffc365ee0a1bd1888120d26b6365f0
|
|
|
| |
Also change job tests to use `nvim` instead of random programs like `ping`.
|
|\ |
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
| |
Problem:
On Windows, spawning the `nvim --embed` server with `detach=true` breaks
various `tt.setup_child_nvim` tests.
Solution:
Make this behavior opt-in with an env var, temporarily.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
Cannot detach the current UI.
Solution:
- Introduce `:detach`.
- Introduce `Channel.detach`.
Co-authored-by: bfredl <bjorn.linse@gmail.com>
|
|
|
|
|
|
| |
Problem: `get_option_value` returns caller owned `Object`s but the
corresponding C apis do not marked `FUNC_API_RET_ALLOC` properly.
Solution: add `FUNC_API_RET_ALLOC` to the C apis.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Match both | separators and link to the Delimiter highlight group.
fixes vim/vim#16584
closes: vim/vim#16590
https://github.com/vim/vim/commit/f30eb4a17084eea741a9eb09ba47dd501412283d
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: The behavior of the visual search mappings aren't consistent
with their normal mode counterparts.
- The count isn't considered
- Searching with an empty selection will match every character in the
buffer
- Searching backwards only jumps back when the cursor is positioned at
the start of the selection.
Solution:
- Issue `n` `v:count1` times
- Error out and exit visual mode when the selection is empty
- Detect when the cursor is not at the start of the selection, and
adjust the count accordingly
Also, use the search register instead of the more error-prone approach
of feeding the entire search string as an expression
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
`vim.tbl_get(tbl, nil, 1)` returns `tbl` itself. In this case, `keys` is not
empty, but `ipairs` skips the iteration:
local keys = { nil, 1 }
assert(#keys == 2)
for i, k in ipairs(keys) do
assert(false, 'unreachable')
end
Solution:
Use `select("#", ...)` and `select(i, ...)` to ensure consistency for count and
iteration.
|
|
|
|
|
|
|
| |
Problem:
cmdline abort state may be reset when intermediate states are received.
Solution:
Reset after `self:_wait()`.
|
|
|
| |
Also remove a hack in the multigrid "with winbar" test.
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: completion doesn't work with multi lines
(Łukasz Jan Niemier)
Solution: handle linebreaks in completion code as expected
(glepnir)
fixes: vim/vim#2505
closes: vim/vim#15373
https://github.com/vim/vim/commit/76bdb82527a13b5b2baa8f7d7ce14b4d5dc05b82
|
|
|
|
|
|
|
|
| |
Problem:
Deadly signal messages mention "Vim", and add redundant newlines.
Solution:
- Update the messages.
- Don't add an extra newline.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Now `:InspectTree` will show missing nodes as e.g. `(MISSING identifier)`
or `(MISSING ";")` rather than just `(identifier)` or `";"`. This is
doable because the `MISSING` keyword is now valid query syntax.
Co-authored-by: Christian Clason <c.clason@uni-graz.at>
|
|
|
|
| |
Before #31525 the prompts had a trailing space.
Also add a test for #7857.
|
|
|
| |
Follow-up to #27358.
|