Problem: More functions can be used as methods.
Solution: Make various functions usable as a method. Make the window
command test faster.
ce90e36f59
test_* functions in the patch are N/A as they modify internal state.
Include test changes for test_ignore_error and test_feedinput (though they aren't run).
Other changed tests were excluded from previous patches, except test_termcodes.vim, which hasn't
been ported yet.
Problem: More functions can be used as methods.
Solution: Make various functions usable as a method.
f6ed61e148
+sound is needed for sound_* functions.
Make swapinfo and swapname take exactly one argument.
Previously, they could erroneously take one or more.
Problem: More functions can be used as methods.
Solution: Make various functions usable as a method.
aad222c9c9
Partial port as this does not include eval.txt change for listener_add.
Cherry-pick eval.txt changes for:
- bufadd from v8.1.1626:
5ca1ac373a
- setloclist and setqflist headers from:
b0d45e7f53
Correct eval.txt typo for settabwinvar method call (matches latest Vim).
Problem: More functions can be used as methods.
Solution: Make sign functions usable as a method.
93476fd634
Make sign_placelist and sign_unplacelist accept exactly one argument.
Before, they erroneously accepted one or more arguments.
Problem: More functions can be used as methods.
Solution: Make various functions usable as a method.
196b466443
server2client requires +clientserver, which hasn't been ported yet.
The eval.txt docs and test_clientserver.vim tests for server2client already exist, so include those
changes.
test_bufline.vim: Test for setbufline requires v8.1.1189 (which was reverted in #10848).
Problem: More functions can be used as methods.
Solution: Make various functions usable as a method.
4c313b13fb
The rest of this patch was ported in
3137c7d635
N/A patches for version.c:
vim-patch:8.1.2012: more functions can be used as methods
Problem: More functions can be used as methods.
Solution: Make terminal functions usable as a method. Fix term_getattr().
7ee80f7661
vim-patch:8.2.3576: some functions are not documented for use with a method
Problem: Some functions are not documented for use with a method.
Solution: Add examples. Fix that sign_unplacelist() only takes one
argument. (Sean Dewar, closesvim/vim#9081)
a63780b977
Addressed in the port of v8.1.1995.
This allows users to hook into diagnostic events with finer granularity
(e.g. per-buffer or file).
BREAKING CHANGE: DiagnosticsChanged and LspDiagnosticsChanged user
autocommands are removed.
Previously, the built-in language server client checked if the first
argument of cmd was executable via vim.fn.executable. This ignores PATH
injected via cmd_env. Instead, we now start the client via uv.spawn, and
handle the failure mode, reporting the error back to the user.
Co-authored-by: Mathias Fußenegger <mfussenegger@users.noreply.github.com>
Floating windows opened by `goto_next` and `goto_prev` should not be
focused when repeating the `goto_` function. The float can still be
focused by calling `open_float` with `scope = "cursor"`.
Reverts 5b0d8f85fd.
Diagnostic producers can send diagnostics for buffers that are not
loaded, for which we cannot retrieve the line count to clamp line
numbers. This means that some diagnostics in the quickfix list could be
line-clamped and others not. The quickfix list can already handle line
numbers past the end of the buffer (i.e. it *already* clamps line
numbers) so just use the "raw" diagnostic positions sent from the
producer.
04bfd20bb introduced a subtle bug where using 0 as the buffer number in
the diagnostic cache resets the cache for the current buffer. This
happens because we were not checking to see if the _resolved_ buffer
number already existed in the cache; rather, when the __index metamethod
was called we assumed the index did not exist so we set its value to an
empty table. The fix for this is to check `rawget()` for the resolved
buffer number to see if the index already exists.
However, the reason this bug was introduced in the first place was
because we are simply being too clever by allowing a 0 buffer number as
the index which is automatically resolved to a real buffer number.
In the interest of minimizing metatable magic, remove this "feature" by
requiring the buffer number index to always be a valid buffer. This
ensures that the __index metamethod is only ever called for non-existing
buffers (which is what we wanted originally) as well as reduces some of
the cognitive overhead for understanding how the diagnostic cache works.
The tradeoff is that all public API functions must now resolve 0 buffer
numbers to the current buffer number.
The phrase referred specifically to `$VIMINIT` and `$EXRC`, which
are parsed (and available with, e.g., `echo $VIMINIT` if set) but
of course not loaded since _any_ initialization is skipped. Hence
this is redundant and can be misleading.
vim-patch:8.2.3627: difficult to know where the text starts in a window
Problem: difficult to know where the text starts in a window. (Sergey
Vlasov)
Solution: Add the "textoff" entry in the result of getwininfo().
(closesvim/vim#9163)
cdf5fdb294
Fix indent in Test_getbufwintabinfo().
Errors were being caused by invalid buffers being kept around in
diagnostic_cache, so add a metatable to diagnostic_cache which attaches
to new buffers in the cache, removing them after they are invalidated.
Closes#16391.
Co-authored-by: Gregory Anders <8965202+gpanders@users.noreply.github.com>
Problem: ci" finds following string but ci< and others don't.
Solution: When not inside an object find the start. (Connor Lane Smit,
closesvim/vim#8670)
b9115da4be
Problem: On a narrow screen ":hi" output is confusing.
Solution: Insert a space between highlight group name and "xxx". (Masato
Nishihaga, closesvim/vim#4599)
548be7f126
Problem: getcompletion() always passes zero as position to custom
completion function.
Solution: Pass the pattern length. (closesvim/vim#9173)
4785fe02bb
Co-authored-by: ii14 <ii14@users.noreply.github.com>
Problem: printf format not checked for semsg().
Solution: Add GNUC attribute and fix reported problems. (Dominique Pelle,
closesvim/vim#3805)
b5443cc46d
(Most of the changes do not apply because Neovim already uses PRId64 and other spelling mistakes were already fixed.)