| Commit message (Collapse) | Author | Age |
| |
|
| |
|
|
|
|
|
|
|
|
| |
Problem: `cmdline_show` is emitted unnecessarily each event
loop iteration, because `cmdline_was_last_drawn` is never set.
Solution: Keep track of whether the cmdline was last drawn to avoid
unnecessarily emitting cmdline_show. Set `redraw_state` to
emit `cmdline_pos` when emitting `CursorMovedC`. Only emit
`cmdline_pos` when cmdline was last drawn.
|
| |
|
|
|
|
|
|
| |
Problem: nlua_call_ref_ctx() does not pop the return value in fast
context that did not error.
Solution: Fall through to end; calling nlua_call_pop_retval().
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Problem:
`vim.hl.on_yank()` has a "timeout" behavior but this is not available for
`vim.hl.range()`.
Solution:
Add `timeout` arg to `vim.hl.range()`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: filetype: setting bash filetype is backwards incompatible
Solution: revert patch v9.1.0965, detect bash scripts again as sh
filetype
This reverts commit b9b762c21f2b61e0e7d8fee43d4d3dc8ecffd721.
related: vim/vim#16309
https://github.com/vim/vim/commit/727c567a0934643e2d6e1dd92d4e636b17d9067f
Co-authored-by: Christian Brabandt <cb@256bit.org>
vim-patch:9.1.1033: tests: shaderslang was removed from test_filetype erroneously
Problem: tests: shaderslang was removed from test_filetype erroneously
(Christian Clason, after v9.1.1030)
Solution: restore the test
https://github.com/vim/vim/commit/1d2867df0c5dfa3d2444229f9e4b23d6ff935956
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
Calling `xstrdup` with a NULL pointer causes a SIGSEGV if `lua_tostring` returns
NULL in `nlua_luv_thread_common_cfpcall`.
Crash stack trace:
- `_platform_strlen` → `xstrdup` (memory.c:469)
- `nlua_luv_thread_common_cfpcall` (executor.c:281)
Solution:
Check if `lua_tostring` returns NULL and pass NULL to `event_create` to avoid the crash.
|
|
|
|
|
|
|
|
|
|
|
| |
Making this opt-out (on by default) was the wrong choice from the
beginning. It is too visually noisy to be enabled by default.
BREAKING CHANGE: Users must opt-in to the diagnostic virtual text
handler by adding
vim.diagnostic.config({ virtual_text = true })
to their config.
|
|
|
|
|
|
| |
Problem: If a (vim.ui_attach) cmdline_hide callback triggers a redraw,
it may cause cmdline_show events for an already exited cmdline.
Solution: Avoid emitting cmdline_show event when ccline.cmdbuff is
already NULL. Unset ccline.cmdbuff before emitting cmdline_hide.
|
|\ |
|
| | |
|
|/
|
|
|
|
|
|
| |
Problem:
vim.fs.dir(), vim.fs.find() do not follow symlinks.
Solution:
- Add "follow" flag.
- Enable it by default.
|
|
|
|
|
| |
This is needed to replace the nvim-lspconfig function is_descendant that
some lspconfg configurations still use.
|
| |
|
|
|
|
|
| |
directly" (#31924)
Reverts #31112
|
|\
| |
| | |
refactor(options): set option value for non-current context directly
|
| |
| |
| |
| |
| |
| | |
Problem: Currently, we use `switch_option_context` to temporarily switch the current option context before setting an option for a different buffer / window. This is not ideal because we already support getting and setting option values for non-current contexts in the underlying implementation.
Solution: Set option value for non-current context by passing the context directly to the lower level functions. Also introduce a new `OptCtx` struct to store option context information, this will scale much better if we add more option scopes and other context information in the future.
|
| |
| |
| |
| |
| | |
Also add tests for the current path casing behavior so it doesn't get
accidentally changed.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
Tests that need to check `nvim` CLI behavior (no RPC session) create
their own ad-hoc `system()` wrappers.
Solution:
- Use `n.spawn_wait` instead of `system()`.
- Bonus: this also improves the tests by explicitly checking for
`stdout` or `stderr`. And if a signal is raised, `ProcStream.status`
will reflect it.
|
| |
| |
| |
| |
| |
| |
| | |
Problem: Prompts are emitted as messages events, where cmdline events
are more appropriate. The user input is also emitted as
message events in fast context, so cannot be displayed with
vim.ui_attach().
Solution: Prompt for user input through cmdline prompts.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
(#31749)
Problem: filetype: sh filetype set when detecting the use of bash
Solution: when bash is detected, use 'bash' filetype instead
(Luca Saccarola)
closes: vim/vim#16309
https://github.com/vim/vim/commit/b9b762c21f2b61e0e7d8fee43d4d3dc8ecffd721
|
|/
|
|
|
|
| |
Problem: There is currently no way to check if a given path is absolute or convert a relative path to an absolute path through the Lua stdlib. `vim.fs.joinpath` does not work when the path is absolute. There is also currently no way to resolve `C:foo\bar` style paths in Windows.
Solution: Add `vim.fs.abspath`, which allows converting any path to an absolute path. This also allows checking if current path is absolute by doing `vim.fs.abspath(path) == path`. It also has support for `C:foo\bar` style paths in Windows.
|
|
|
|
|
| |
Pass along whether message in msg_show event is added to the internal
:messages history.
|
|
|
|
|
|
|
|
| |
Problem: Unable to tell what highlight the prompt part of a
cmdline_show event should have, and whether cmdline_hide was
emitted after aborting.
Solution: Add additional arguments hl_id to cmdline_show, and abort to
cmdline_hide.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a terminal application running inside the terminal emulator sets
the cursor shape or blink status of the cursor, update the cursor in the
parent terminal to match.
This removes the "virtual cursor" that has been in use by the terminal
emulator since the beginning. The original rationale for using the
virtual cursor was to avoid having to support additional UI methods to
change the cursor color for other (non-TUI) UIs, instead relying on the
TermCursor and TermCursorNC highlight groups.
The TermCursor highlight group is now used in the default 'guicursor'
value, which has a new entry for Terminal mode. However, the
TermCursorNC highlight group is no longer supported: since terminal
windows now use the real cursor, when the window is not focused there is
no cursor displayed in the window at all, so there is nothing to
highlight. Users can still use the StatusLineTermNC highlight group to
differentiate non-focused terminal windows.
BREAKING CHANGE: The TermCursorNC highlight group is no longer supported.
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
- API functions using `try_start` directly, do not surface the
underlying error message, and instead show generic messages.
- Error-handling code is duplicated in the API impl.
- Failure modes are not tested.
Solution:
- Use `TRY_WRAP`.
- Add tests.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
Regression from de794f2d2409: `vim.diagnostic.setqflist{open=true}` attempts to
open the location list instead of the diagnostics quickfix list if it didn't
exist before. This is because we are using `qf_id` to decide which to open, but
`qf_id=nil` when there is no existing diagnostics quickfix list with a given
title ("Diagnostics" by default).
Solution:
- Revert to using `loclist` to decide which to open.
- Add tests.
|
|
|
|
|
|
|
|
|
|
| |
**Problem:**
The brackets in the RFC2732 regular expression are currently unescaped,
causing them to be misinterpreted as special characters denoting
character groups rather than as literal characters.
**Solution:**
Escape the brackets.
Fix #31270
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
vim.json.encode escapes every slash in string values (for example in
file paths), and is not optional. Use-case is for preventing HTML
injections (eg. injecting `</script>` closing tag); in the context of
Nvim this is rarely useful.
Solution:
- Add a `escape_slash` flag to `vim.json.encode`.
- Defaults to `false`. (This is a "breaking" change, but more like
a bug fix.)
|
| |
|
| |
|
|\ |
|
| | |
|
|/
|
|
| |
Fixes #30846
|
|
|
| |
Co-authored-by: glepnir <glephunter@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
`vim.loader.disable` does not conform to `:help dev-name-common` and
`:help dev-patterns`.
Solution:
- Add `enable` parameter to `vim.loader.enable`
- Remove `vim.loader.disable`
- Note the change in `:help news-breaking-dev` (HEAD changes).
- This is not a breaking change (except to "HEAD") because
`vim.loader` is marked "experimental".
previous: 26765e8461c1ba1e9a351632212cf89900221781
|
|
|
| |
Also add a test for #31306, which currently fails.
|
|
|
| |
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
|
|
|
| |
Add kinds for various commands that output a list, the 'wildmode'
list, and for number prompts.
|
|
|
|
|
|
|
|
| |
Problem:
If there's an error in `FileType` autocmd, the filetype get-opt buffer
doesn't get cleaned up.
Solution:
Call `aucmd_restbuf`.
|
|
|
|
|
|
| |
Problem: Separate message emitted for each newline present in Lua
print() arguments.
Solution: Make msg_multiline() handle NUL bytes. Refactor print() to use
msg_multiline(). Refactor vim.print() to use print().
|
| |
|