Problem:
There is no indication of when cursor is "behind" an unfocused, floating window.
Solution:
Set underline cursor to indicate when an unfocused floatwin is over the active cursor.
From the LSP Spec:
> There are two uses cases where it can be beneficial to only compute
> semantic tokens for a visible range:
>
> - for faster rendering of the tokens in the user interface when a user
> opens a file. In this use case, servers should also implement the
> textDocument/semanticTokens/full request as well to allow for flicker
> free scrolling and semantic coloring of a minimap.
> - if computing semantic tokens for a full document is too expensive,
> servers can only provide a range call. In this case, the client might
> not render a minimap correctly or might even decide to not show any
> semantic tokens at all.
This commit unifies the usage of range and full/delta requests as
recommended by the LSP spec and aligns neovim with the way other LSP
clients use these request types for semantic tokens.
When a server supports range requests, neovim will simultaneously send a
range request and a full/delta request when first opening a file, and
will continue to issue range requests until a full response is
processed. At that point, range requests cease and full (or delta)
requests are used going forward. The range request should allow servers
to return a result faster for quicker highlighting of the file while it
works on the potentially more expensive full result. If a server decides
the full result is too expensive, it can just error out that request,
and neovim will continue to use range requests.
This commit also fixes and cleans up some other things:
- gen_lsp: registrationMethod or registrationOptions imply dynamic
registration support
- move autocmd creation/deletion to on_attach/on_detach
- debounce requests due to server refresh notifications
- fix off by one issue in tokens_to_ranges() iteration
Problem: 0x08 is treated as Backspace instead of Ctrl-H on Windows.
Solution: Treat 0x7f as Backspace if VT input is enabled, so that 0x08
is treated as Ctrl-H.
Ref: https://github.com/microsoft/terminal/issues/4949
Problem:
Temporary files from /tmp/ and /private/ paths clutter :oldfiles list.
Additionally, the documented Windows default (rA:,rB:) was never applied
due to a missing platform condition.
Solution:
Drop platform-specific shada differences and default to excluding
/tmp/ and /private/ paths.
problem: currently when empty string is set as prompt the prompt-mark
column doesn't update.
solution: ensure the column is reset to 0 when starting prompt buffer and
before creating a new prompt after prompt-callback.
Problem: Internal messages do not have an ID, which is unexpected and
undocumented.
Solution: Always assign a msg_id to msg_show events, simplifying
logic/expectations for UIs.
Problem: No empty msg_ruler event after leaving a window whose ruler
is not part of the statusline with 'rulerformat'.
Solution: Properly keep track of when a ruler event was emitted with
'rulerformat' to emit clear event.
Problem:
Using vim.defer_fn() just before Nvim exit leaks luv handles.
Solution:
Make vim.schedule() return an error message if scheduling failed.
Make vim.defer_fn() close timer if vim.schedule() failed.
Problem: using NOT with a float returns a float in legacy vim script
(kennypete)
Solution: Return a number instead of a float (Yegappan Lakshmanan)
fixes: vim/vim#19282closes: vim/vim#19289ecc3faef61
N/A patches:
vim-patch:8.2.1980: Vim9: some tests are not done at the script level
vim-patch:9.1.2122: Vim9: Negating a float doesn't result in a bool
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Problem:
Currently, : mark is set in start of prompt-line. But more relevant
location is where the user text starts.
Solution:
Store and update column info on ': just like the line info
Problem: 'cursorline' and part of 'statusline' are missing after
:diffput to an empty buffer.
Solution: Make sure the cursor doesn't go beyond the last line after
:diffput (zeertzjq)
related: neovim/neovim#37621
closes: vim/vim#19281ce1e562fda
Problem: crash when using 'tagfunc' (Rodrigo Queipo)
Solution: Do not add the user_data to the 'info' dictionary when called
for insert mode completion (the TAG_INS_COMP flag is set).
Completion should not depend on the state of a previous tag
jump. (Yasuhiro Matsumoto)
fixes: vim/vim#19255closes: vim/vim#1928457b577df32
Co-authored-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Problem: Unexpected behavior after PTY child process fails to chdir(),
as it then thinks it's the parent process.
Solution: Exit the child process instead of returning.
Problem: Heap UAF if a terminal buffer is deleted during TermRequest in
Normal mode.
Solution: Increment terminal refcount before triggering TermRequest, and
destroy the terminal if the buffer is closed during that.
Problem: Wrong terminal scrollback if BufFile* autocommand drains PTY
output but doesn't process the pending refresh.
Solution: Refresh scrollback before refreshing screen in terminal_open()
if scrollback has been allocated.
Problem:
The :intro fails to display in ui2 because wait_return(true) triggers a full
redraw. Furthermore statuslines are visible when using :intro
Solution:
Replace wait_return() with plain_vgetc(). This works with old and ui2 while also removing the unnecessary statusline and "press ENTER" prompt.
Updates tests to work with new behaviour.
Signed-off-by: ashab-k <ashabkhan2000@gmail.com>
Problem:
Calling os_chdir() to change the child processes' CWD may cause some
unnecessary UI events to be buffered. These UI events don't go anywhere
as execvp() is called before flushing the UI buffer.
Solution:
Use uv_chdir() instead of os_chdir(). Also fix getting error string
incorrectly. Add test for the current behavior.
Problem: Terminal loses output if a BufFilePre or BufFilePost autocmd
polls for events.
Solution: Rename the buffer after allocating the terminal instance. Also
fix buffer getting wrong name if BufFilePre uses NameBuff.
Problem: There are still ways to run into textlock errors with
vim.ui_attach callbacks trying to display a UI event.
Solution: Disregard textlock again during vim.ui_attach() callbacks
(also when scheduled). Partially revert 3277dc3b; avoiding
to flush while textlock is set is still helpful.
vim-patch:9.1.1988: osc52 package can be further improved
vim-patch:5fb29bb7e runtime(osc52): Update documentation, send DA1 query when loading package
vim-patch:e6a11d45e runtime(osc52): A few minor fixes
vim-patch:1d4fe8905 CI: Add C preproc indentation check to CI
vim-patch:a5ba252f0 runtime(doc): Tweak tag lines in vim9.txt
vim-patch:c035f518c CI: check encoding of runtime files with utf-8 name
Usually, terminal_close() calls refresh_terminal(), which allocates the
scrollback buffer, and term_may_alloc_scrollback() in terminal_open()
won't dereference the buffer. However, refresh_terminal() is not called
during Nvim exit, in which case a heap-use-after-free may happen if
TermOpen wipes buffer. Check for non-NULL buf_handle to avoid that.
Problem: When TermOpen polls for enough events to use the scrollback
buffer, scrollback is lost until the next terminal refresh.
Solution: Allocate the scrollback buffer when it's needed.
Problem: Fast context for msg_show event inhibits vim.ui_attach from
displaying a stream of messages from a single command.
Solution: Remove fast context from msg_show events emitted as a result
of explicit API/command calls. The fast context was originally
introduced to prevent issues with internal messages.
vim-patch:8.2.1857: Vim9: using job_status() on an unused var gives an error
vim-patch:8.2.2064: terminal: cursor is on while redrawing, causing flicker
vim-patch:8.2.3585: crash when passing float to "term_rows" of term_start()
vim-patch:8.2.3640: freeze when calling term_wait() in a close callback
vim-patch:8.2.3666: libvterm is outdated
vim-patch:8.2.3803: GUI: crash with 'writedelay' set using a terminal window
vim-patch:8.2.4695: JSON encoding could be faster
vim-patch:8.2.4699: hard to reproduce hang when reading from a channel
vim-patch:8.2.4757: list of libraries to suppress lsan errors is outdated
vim-patch:8.2.4788: large payload for LSP message not tested
vim-patch:8.2.4830: possible endless loop if there is unused typahead
vim-patch:8.2.5055: statusline is not updated when terminal title changes
vim-patch:9.0.0235: 'autoshelldir' does not work with chunked respose
vim-patch:9.0.0394: Cygwin: multibyte characters may be broken in terminal window
vim-patch:9.0.0524: build instructions for MS-Windows are outdated
vim-patch:9.0.0774: the libvterm code is outdated
vim-patch:9.0.1269: channel test often fails on Mac OS
vim-patch:9.0.1487: Content-type header for LSP channel not according to spec
vim-patch:9.0.1498: in a terminal window the cursor may jump around
vim-patch:9.0.1509: error message lacks mentioning the erroneous argument
vim-patch:9.0.1527: crash when using negative value for term_cols
vim-patch:9.0.1627: no generic mechanism to test syntax plugins
vim-patch:9.0.1628: syntax tests fail on FreeBSD
vim-patch:9.0.1692: Android not handling AI_V4MAPPED ai_flag
vim-patch:9.0.1790: Redundant LSP Content-Type header
vim-patch:b147d3148 tests: Improve the codestyle test (#12988)
vim-patch:9.0.1922: LSP server request message is misinterpreted as a response message
vim-patch:9.0.1927: patch 1916 (fixed terminal size) not optimal
vim-patch:9.0.1929: runtime tests fail with tiny vim
vim-patch:9.0.1939: still a problem when processing LSP RPC requests
vim-patch:4ae16d721 Improve CONTRIBUTING.md
vim-patch:74a233184 NSIS: Possibility to include translated license and README.txt files (#14311)
vim-patch:3ac83c714 The CODEOWNERS File is not useful
vim-patch:b7258738f runtime(doc): fix typo in usr_52.txt
vim-patch:f5c8f520b runtime(doc): fix typo in vim9script help file (#14782)
vim-patch:bad9577b9 runtime(doc): include some vim9 script examples in the help
vim-patch:98fb81846 runtime(comment): clarify the usage of 'commentstring' option value
vim-patch:9.1.0473: term_start() does not clear vertical modifier
vim-patch:9.1.0475: cmod_split modifier is always reset in term_start()
vim-patch:9d85d4dcf runtime(manpager): avoid readonly prompt
vim-patch:9.1.0606: tests: generated files may cause failure in test_codestyle
vim-patch:9.1.0639: channel timeout may wrap around
vim-patch:9.1.0643: terminal: cursor may end up on invalid position
vim-patch:166f89e04 runtime(doc): update vim90 to vim91 in docs
vim-patch:914213616 runtime(comment): add gC mapping to (un)comment rest of line
vim-patch:0fb25515c runtime(comment): fix syntax error
vim-patch:e021f39b7 runtime(comment): commenting might be off by one column
vim-patch:7b27fc49a runtime(comment): consider &tabstop in lines after whitespace indent
vim-patch:9.1.0763: tests: cannot run single syntax tests
vim-patch:f64bafd98 runtime(comment): fix commment toggle with mixed tabs & spaces
vim-patch:9.1.0787: cursor position changed when using hidden terminal
vim-patch:55adc5b46 runtime(doc): update coding style documentation
vim-patch:feea1b444 Add an .editorconfig file to repository
vim-patch:ba0b45857 translation(am): Remove duplicate keys in desktop files
vim-patch:de6a31301 runtime(doc): mention auto-format using clang-format for sound.c/sign.c
vim-patch:9.1.0989: Vim9: Whitespace after the final enum value causes a syntax error
vim-patch:9.1.1047: Makefiles uses non-portable syntax
vim-patch:9.1.1061: tests: test_glvs fails when unarchiver not available
vim-patch:7ceca3eb0 runtime(syntax-tests): Support "wait-free" test failure
vim-patch:9.1.1229: the comment plugin can be improved
vim-patch:20e46fa65 Improve contributing guide by adding a section on signing off commits
vim-patch:9.1.1240: Regression with ic/ac text objects and comment plugin
vim-patch:9.1.1254: need more tests for the comment plugin
vim-patch:9.1.1259: some issues with comment package and tailing spaces
vim-patch:9.1.1293: comment plugin does not handle 'exclusive' selection for comment object
vim-patch:9.1.1336: comment plugin does not support case-insensitive 'commentstring'
vim-patch:9.1.1348: still E315 with the terminal feature
vim-patch:55f9e2bef runtime(doc): Tweak documentation style in develop.txt
vim-patch:9.1.1399: tests: test_codestyle fails for auto-generated files
vim-patch:9.1.1456: comment plugin fails toggling if 'cms' contains \
vim-patch:aef2e53cf runtime(comment): handle special chars ^$[ robustly
vim-patch:1cbe3e89c runtime(comment): add <Plug>-mappings
vim-patch:9.1.1536: tests: test_plugin_comment uses wrong :Check command
vim-patch:58706ac04 Update editorconfig and the documented C-style for sign.c/sound.c
vim-patch:9.1.1597: CI reports leaks in libgtk3 library
vim-patch:46ec89902 runtime(doc): update develop assumptions
vim-patch:bc51ec53d runtime(doc): Update CONTRIBUTING and clarify use of Vim9 script
vim-patch:d1833d282 runtime(doc): allow more C99 features
vim-patch:0ed08788a runtime(doc): document use of proto files in develop.txt
vim-patch:05662b63b runtime(doc): Tweak spacing in develop.txt
vim-patch:e89efc22b runtime(doc): update Vim policy
vim-patch:fabe9a4c8 nsis: Getting the Vim version number via makensis
vim-patch:9.1.1841: patch 9.1.1840 adds python build dependency
vim-patch:bcf6c32b5 runtime(doc): Tweak documentation in develop.txt
vim-patch:9.1.1905: tabpanel: truncates terminal output
vim-patch:9.1.1912: tests: test_plugin_comment fails
vim-patch:ef7a577b2 runtime(doc): Remove outdated agide.org link
vim-patch:9.1.2025: conpty terminal process may not start
vim-patch:ce1636548 runtime(doc): Emphasize adding tests when contributing
vim-patch:d09be1584 runtime(doc): Update Contributing.md on the use of AI
vim-patch:9.1.2039: if_ruby: crash when using Ruby/dyn 4.0
vim-patch:0115da33b CI: Missing test of Vim with ConPTY on Windows
vim-patch:9.1.2047: MS-Windows: style issue in gui_w32.c
vim-patch:9.1.2048: MS-Windows: backspace behavior wrong with ConPTY
vim-patch:9.1.2053: MS-Windows: May use wrong find command
vim-patch:0ed8ba307 Always force LF line endings in old test .ok files
vim-patch:a735e44b3 translation(ru): updated menu files according to the patch 9.1.1989
vim-patch:416d1a5e2 translation(ru): added a disclaimer to the license translation
vim-patch:0084e4bd1 gitattributes: mark test21.ok binary, drop test42.in
vim-patch:aa58f1fe4 CI: build failure in if_perl.xs
vim-patch:9.1.2065: GvimExt cannot be linked statically using MinGW
vim-patch:5516fc534 runtime(syntax-tests): Adapt "runtime/syntax/testdir/vimcmd" for "src/testdir/util/shared.vim"
vim-patch:9.1.2073: auto/configure needs to be regenerated
vim-patch:9.1.2074: Compile error with Motif GUI
vim-patch:da44ef6a9 runtime(c,cpp): Add reference links to noreturn tests
vim-patch:8211f556d runtime(syntax-tests): tests: sh_10 fails on MacOS runners
vim-patch:9.1.2091: Ruby integration does not work correctly
vim-patch:9.1.2096: Vim9: truthiness issue with objects
vim-patch:9.1.2099: different line endings in ja.sjis.po and ja.po
vim-patch:284f8669e CI: Reorder path in Windows CI runners and move Python3 before $PATH
vim-patch:9.1.2101: Vim9: more truthiness issues
vim-patch:8.2.0572: using two lines for free and reset
vim-patch:8.2.2291: Vim9: cannot use "null" for v:null
vim-patch:8.2.2961: keys typed during a :normal command are discarded
vim-patch:9.0.1567: profiler calculation may be wrong on 32 bit builds
vim-patch:9.0.1776: No support for stable Python 3 ABI
vim-patch:9.0.1859: heap-use-after-free in bt_normal()
vim-patch:9.0.2052: win32: using deprecated wsock32 api
vim-patch:9.1.2052: Compile error when disabling linebreak feature
vim-patch:5e37e31: runtime(tutor): fix wrong motion in instruction
vim-patch:9.1.2067: shadow variable warning in menu.c
vim-patch:f78629b: runtime(doc): Fix typo at :help 'fsync'
Problem:
On exit, it's possible that term_delayed_free() hasn't been called yet
when the main loop is freed, in which case it won't be called ever.
Solution:
Don't bail out with term->destroy set when calling terminal_close()
inside free_all_mem().
Problem: Using freed memory when executing unmenu at the more prompt.
Solution: Do not clear menus while listing them. (closesvim/vim#11439)
920d311480
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Multiple eol_right_align virtual texts with different widths
are incorrectly positioned. The lookahead loop uses `item` instead of
`lookaheadItem` when checking kind and accessing data, causing all
items to use the first item's width.
Solution: Use `lookaheadItem->kind` and `lookaheadItem->data.vt`
instead of `item->kind` and `item->data.vt` in the lookahead loop.
Problem: When checking a .po file (make -C src/po check), errors are not
displayed.
Solution: Adding "silent" to some normal commands in check.vim
suppresses unnecessary output (Muraoka Taro)
This is because the output of check.vim is redirected to /dev/null.
However, if you stop the redirection, check.vim generates a lot of
output and becomes very slow.
When these commands are run in ex mode, they output the contents of the
line the cursor is pointing to. This caused a lot of output.
closes: vim/vim#192273456303430
Co-authored-by: Muraoka Taro <koron.kaoriya@gmail.com>
Problem: check.vim complains about overlong comment lines
Solution: only check the length of non-commented lines
32a5faa6d7
Co-authored-by: Christian Brabandt <cb@256bit.org>