Problem: no fuzzy-matching support for insert-completion
Solution: enable insert-mode completion with fuzzy-matching
using :set completopt+=fuzzy (glepnir).
closes: vim/vim#14878a218cc6cda
Co-authored-by: glepnir <glephunter@gmail.com>
LspDetach is now triggered by the main on_detach callback that is added
when an LSP client is attached to a buffer. The semantic_tokens module
already includes a LspDetach handler that does the right thing. When the
LspDetach trigger was added to the main LSP on_detach, it created a race
condition in semantic tokens when a buffer was deleted that would
trigger both its own on_detach and the LspDetach handlers. If the former
came last, an error was thrown trying to delete a non-existent augroup
(destroy() was being called twice).
Problem: Unsetting global variables earlier in #28578 to avoid
recursiveness, caused superfluous or even unlimited
showmode().
Solution: Partly revert #28578 so that the globals are unset at the end
of showmode(), and avoid recursiveness for ext UI by adding a
recursive function guard to each generated UI call that may
call a Lua callback.
Problem: no whitespace padding in commentstring option in ftplugins
Solution: Change default to include whitespace padding, update
existing filetype plugins with the new default value
(Riley Bruins)
closes: vim/vim#148430a0830624a
Co-authored-by: Riley Bruins <ribru17@hotmail.com>
Problem: Typos in test files.
Solution: Correct the typos. (Dominique Pellé, closesvim/vim#9175)
923dce2b07
Co-authored-by: Dominique Pelle <dominique.pelle@gmail.com>
Problem: Completion side effects not working randomly.
Solution: When creating the table of LSP responses, the table index
was used, but this is not the same as the actual client_id, so it was changed
to use the client_id directly.
Problem: The default commentstring for C/C++ can lead to invalid code
when commenting and does not match the Nvim codebase.
Solution: Change commentstring to `// %s` as used by Neovim. Also
set all commentstrings that derive from the default C string explicitly
(and correctly).
Problem: too many strlen() calls in drawline.c
Solution: Refactor code to avoid strlen()
(John Marriott)
closes: vim/vim#14890f51ff96532
Co-authored-by: John Marriott <basilisk@internode.on.net>
Problem: Coverity complains about division by zero
Solution: Check explicitly for sw_val being zero
Shouldn't happen, since tabstop value should always be larger than zero.
So just add this as a safety measure.
7737ce519b
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: Text properties wrong when tabs and spaces are exchanged.
Solution: Take text properties into account. (Nobuhiro Takasaki,
closesvim/vim#5427)
5cb0b93d52
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Left shift is incorrect with vartabstop and shiftwidth=0
Solution: make tabstop_at() function aware of shift direction
(Gary Johnson)
The problem was that with 'vartabstop' set and 'shiftwidth' equal 0,
left shifts using << were shifting the line to the wrong column. The
tabstop to the right of the first character in the line was being used
as the shift amount instead of the tabstop to the left of that first
character.
The reason was that the tabstop_at() function always returned the value
of the tabstop to the right of the given column and was not accounting
for the direction of the shift.
The solution was to make tabstop_at() aware of the direction of the
shift and to choose the tabtop accordingly.
A test was added to check this behavior and make sure it doesn't
regress.
While at it, also fix a few indentation/alignment issues.
fixes: vim/vim#14864closes: vim/vim#1488788d4f255b7
Co-authored-by: Gary Johnson <garyjohn@spocom.com>
Problem: Test for what 8.2.4436 fixes does not check for regression.
Solution: Set several options. (Ken Takata, closesvim/vim#9830)
2dada73a4e
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Crash with weird 'vartabstop' value.
Solution: Check for running into the end of the line.
4e889f98e9
Code change is N/A as it's superseded by virtual text changes.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Numberwidth may depend on number of signs with text in the
buffer and is not handled correctly for extmark signs.
Solution: Move legacy sign code for changed numberwidth so that it is
handled properly for legacy and extmark signs alike.
Since paste data is handled via a separate channel, the data processed via `input_buffer` is typically just explicit keys as typed in by the user. Therefore it should be fine to use `memmove()` to always put the remaining data in front when refilling the buffer.