| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
| |
runtime(doc,netrw): update "Last Change header", remove trailing whitespace
Update Last-Change Header for netrw and doc/indent.txt, fix a trailing
whitespace in indent.txt and make CI happy.
https://github.com/vim/vim/commit/8fad5d58874ed724f673ac8a83739164cead3961
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
runtime(yaml): disable multiline_scalar detection by default
There have been many complaints about Yaml indenting too much, because
it considers values to be multi-line by default, which leads to
unintended indenting for (apparently most) users.
So let's hide this feature behind the new feature flag, keep it
simple and prefer single line value key pairs by default.
If you want the old behaviour, set the following value: >
:let g:yaml_indent_multiline_scalar = 1
If not set, it will indent the same as the previous line.
closes vim/vim#13845
https://github.com/vim/vim/commit/b4eb3f1e44896b12fdfa3885a78c6eaa181eaeff
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
|
|
|
|
|
|
|
|
|
|
| |
runtime(netrw): handle file/dir symlinks specifically in tree mode
fixes: vim/vim#2386
related: vim/vim#3609
https://github.com/vim/vim/commit/56b7da3c051fe1a5fd76534998c17b22d83c0899
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
|
|
|
|
|
| |
Problem: getline and indent function missing string type in param.
Solution: add string type in eval gen.
|
|
|
|
|
|
| |
Fixup for #27628
Closes #27669
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
runtime(java): Recognise _when_ clauses in _switch_ blocks
Also:
- distinguish _yield_ when used as a contextual keyword from
when used qualified as a method or a method reference (as
can be seen in testdir/input/java_switch.java, variables
and method declarations named _yield_ will be recognised
as the namesake keyword--consider picking other names for
variables, and defining g:java_highlight_functions to have
method names painted; since _yield_ statements can have
trailing parens, they must be recognised as statements,
for only qualified _yield_ method calls are supported);
- recognise grouped _default_ _case_ labels;
- describe primitive types for _case_ labels (JLS, §14.11,
§3.10.1);
- recognise some non-ASCII identifiers (see javaLambdaDef,
javaUserLabel) (further improvement for better recognition
of identifiers will be arranged in a separate PR).
Because the arrow '->' is used in two kinds of expressions,
lambda (abstractions) and _switch_, necessary changes were
made for the recognition of either (and further improvement
touching lambda expressions will be separately arranged).
Because 'default' is used for instance method declarations
in interfaces and in _switch_ labels, necessary changes were
made for the recognition of either (and further improvement
touching method declarations will be separately arranged).
Finally, it deemed appropriate to put 'yield' in the syntax
group of javaOperator rather than javaStatement, for its
member 'var' is also another contextual keyword (e.g., this
is valid syntax: "var var = var(test.var);").
References:
https://openjdk.org/jeps/361 (Switch Expressions)
https://openjdk.org/jeps/440 (Record Patterns)
https://openjdk.org/jeps/441 (Pattern Matching for switch)
Also, add a Java specific filetype plugin for the syntax
test, so that no soft-wrapping of long indented lines occur.
Otherwise the syntax scripts would miss a few lines during
scrolling and verification of the screen dumps.
closes: vim/vim#14105
https://github.com/vim/vim/commit/9ecf02cd5f5feabe096f66cd5f503a822c78793f
Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
set_curbuf() (#27664)
Problem: [security]: autocmd cause use-after-free in set_curbuf()
(kawarimidoll)
Solution: check side-effect of BufLeave autocommand, when the number
of windows changed, close windows containing buffers that will
be wiped, if curbuf changed unexpectedly make sure b_nwindows
is decremented otherwise it cannot be wiped
set_curbuf() already makes some efforts to ensure the BufLeave
autocommands do not cause issues. However there are still 2 issues
that are not taken care of:
1) If a BufLeave autocommand opens a new window containing the same
buffer as that is going got be closed in close_buffer() a bit later,
we suddenly have another window open, containing a free'd buffer. So we
must check if the number of windows changed and if it does (and the
current buffer is going to be wiped (according to the 'bufhidden'
setting), let's immediately close all windows containing the current
buffer using close_windows()
2) If a BufLeave autocommand changes our current buffer (displays it in
the current window), buf->b_nwindow will be incremented. As part of
set_curbuf() we will however enter another buffer soon, which means, the
newly created curbuf will have b_nwindows still have set, even so the
buffer is no longer displayed in a window. This causes later problems,
because it will no longer be possible to wipe such a buffer. So just
before entering the final buffer, check if the curbuf changed when
calling the BufLeave autocommand and if it does (and curbuf is still
valid), decrement curbuf->b_nwindows.
Both issues can be verified using the provided test (however the second
issue only because such an impacted buffer won't be wiped, causing
futher issues in later tests).
fixes: vim/vim#13839
closes: vim/vim#14104
https://github.com/vim/vim/commit/55f8bba73be5f9c3a5a4d0d6c5f56e65f2c7d3fc
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
|
|
| |
Also make it work better on a multiline selection.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: getregion() can be improved (after v9.1.120)
Solution: change getregion() implementation to use pos as lists and
one optional {opt} dictionary (Shougo Matsushita)
Note: The following is a breaking change!
Currently, the getregion() function (included as of patch v9.1.120) takes
3 arguments: the first 2 arguments are strings, describing a position,
arg3 is the type string.
However, that is slightly inflexible, there is no way to specify
additional arguments. So let's instead change the function signature to:
getregion(pos1, pos2 [, {Dict}]) where both pos1 and pos2 are lists.
This is slightly cleaner, and gives us the flexibility to specify
additional arguments as key/value pairs to the optional Dict arg.
Now it supports the "type" key to specify the selection type
(characterwise, blockwise or linewise) and now in addition one can also
define the selection type, independently of what the 'selection' option
actually is.
Technically, this is a breaking change, but since the getregion()
Vimscript function is still quite new, this should be fine.
closes: vim/vim#14090
https://github.com/vim/vim/commit/19b718828d8d5fab52d94c6cdba694641879ab38
Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
Problem: Put in Visual mode wrong if it replaces fold marker.
Solution: Temporarily disable folding during put in Visual mode.
(zeertzjq)
fixes: vim/vim#14097
closes: vim/vim#14100
https://github.com/vim/vim/commit/4e141c66b9104136ddcf9cc240d2fbc83d825a5a
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Problem: `:TOhtml` opens the generated HTML code in a split, meaning it
inherits the `help` filetype if a help buffer is to be converted.
Solution: Explicitly set the filetype to `html`.
|
| |
|
|
|
|
|
|
|
|
|
| |
Previously rename would unconditionally read the to-be-renamed file from the
disk and write it to the disk. This is redundant in some cases
If the file is not already loaded, it's not attached to lsp client, so nvim
doesn't need to care about this file.
If the file is loaded but has no change, it doesn't need to be written.
|
|
|
|
|
|
| |
Co-authored-by: wookayin <wookayin@gmail.com>
Co-authored-by: clason <c.clason@uni-graz.at>
Co-authored-by: Lewis Russell <me@lewisr.dev>
|
|\
| |
| | |
refactor(metadata): generate all metadata in lua
|
|/
|
|
|
|
|
|
| |
Then we can just load metadata in C as a single msgpack blob. Which also
can be used directly as binarly data, instead of first unpacking all the
functions and ui_events metadata to immediately pack it again, which was
a bit of a silly walk (and one extra usecase of `msgpack_rpc_from_object`
which will get yak shaved in the next PR)
|
|
|
|
|
|
|
|
|
|
|
|
| |
runtime(sh): Update ftplugin, fix vim/vim#14101 (vim/vim#14102)
Add the 'b' flag to 'comments', so that the shebang line is not detected as comment.
Fixes vim/vim#14101.
https://github.com/vim/vim/commit/e84d2d4432cd6e43f2bb300d02abc90d551bcf4a
Co-authored-by: dkearns <dougkearns@gmail.com>
|
|
|
|
|
|
|
| |
Problem: Some LSP servers return `textDocument/documentLink` responses
containing file URIs with line/column numbers in the fragment.
`vim.uri_to_fname` returns invalid file names for these URIs.
Solution: Remove the URI fragment from file URIs.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
runtime(vim): Update base-syntax, improve :echo highlighting (vim/vim#14103)
- Normalise behaviour of :echo commands and improve expression matching.
- Allow continued argument lines.
- Refine string interpolation groups.
- Remove duplicated :menu and :map generated commands that are handled
specially later in the file.
https://github.com/vim/vim/commit/b1427b46f5fe50a1daba102c4017d0ef2624b3ba
Co-authored-by: dkearns <dougkearns@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
when EOL is shown (#27651)
Problem: The cursor screen row was incorrectly being calculated when the
cursor follows a 1 character text_align 'below' virtual text line,
resulting in the cursor being shown on the wrong line.
This was caused by a cell size of 2 instead of 1 being used for the EOL
character, which propagated to the calculation of space for putting the
'below' virtual text on its own line. (rickhowe)
Solution: Fix the size used for the EOL character in calculating the
cursor's screen position (Dylan Thacker-Smith)
fixes: vim/vim#11959
related: vim/vim#12028
closes: vim/vim#14096
https://github.com/vim/vim/commit/da0c9137d1ec96f4d79b818502d2f921a21f710e
Co-authored-by: Dylan Thacker-Smith <dylan.ah.smith@gmail.com>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
The documentation flow (`gen_vimdoc.py`) has several issues:
- it's not very versatile
- depends on doxygen
- doesn't work well with Lua code as it requires an awkward filter script to convert it into pseudo-C.
- The intermediate XML files and filters makes it too much like a rube goldberg machine.
Solution:
Re-implement the flow using Lua, LPEG and treesitter.
- `gen_vimdoc.py` is now replaced with `gen_vimdoc.lua` and replicates a portion of the logic.
- `lua2dox.lua` is gone!
- No more XML files.
- Doxygen is now longer used and instead we now use:
- LPEG for comment parsing (see `scripts/luacats_grammar.lua` and `scripts/cdoc_grammar.lua`).
- LPEG for C parsing (see `scripts/cdoc_parser.lua`)
- Lua patterns for Lua parsing (see `scripts/luacats_parser.lua`).
- Treesitter for Markdown parsing (see `scripts/text_utils.lua`).
- The generated `runtime/doc/*.mpack` files have been removed.
- `scripts/gen_eval_files.lua` now instead uses `scripts/cdoc_parser.lua` directly.
- Text wrapping is implemented in `scripts/text_utils.lua` and appears to produce more consistent results (the main contributer to the diff of this change).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
runtime(debian): update Debian syntax files (#14098)
* debversions.vim: Move lunar to unsupported release
* debsources: Add word boundaries around keyword match patterns
https://github.com/vim/vim/commit/c7ddc9b73543d4b3b906b56948dc9a6861150e12
Co-authored-by: James McCoy <jamessan@jamessan.com>
Co-authored-by: James Addison <jay@jp-hosting.net>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
runtime(vim): Update syntax file, improve :substitute matching (vim/vim#14093)
- Differentiate between :substitute and substitute(), fixes vim/vim#13883.
- Match all allowed :substitute delimiters.
- Remove leading context from :substitute matches.
https://github.com/vim/vim/commit/2c51e15b66a4be9b5134c495ef546479aaa89ce9
Co-authored-by: dkearns <dougkearns@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
(#27636)
Problem: <Del> in cmdline mode doesn't delete composing chars
Solution: Use mb_head_off() and mb_ptr2len() (zeertzjq)
closes: vim/vim#14095
https://github.com/vim/vim/commit/ff2b79d23956263ab0120623c37e0b4498be01db
|
|\
| |
| | |
refactor(msgpack): remove undead unpacker code in helpers
|
| |
| |
| |
| |
| | |
Unpacker code now lives in unpacker.c
This was part of the old unpacker which I forgor to remove.
|
|/
|
|
|
| |
Validate the channel number before responding to an OSC 10/11 request.
When used with nvim_open_term, the channel number is unset (since there
is no process on the other side of the PTY).
|
|\
| |
| | |
refactor(fileio): remove API shell layer encouraging unnecessary allocations
|
| |
| |
| |
| |
| |
| | |
writer is only ever used with FileDescriptor. We already have separate
code paths for serializing shada data into memory, see
shada_encode_regs() and friends
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Functions like file_open_new() and file_open_fd_new() which just is a
wrapper around the real functions but with an extra xmalloc/xfree around
is an anti-pattern. If the caller really needs to allocate a
FileDescriptor as a heap object, it can do that directly.
FileDescriptor by itself is pretty much a pointer, or rather two:
the OS fd index and a pointer to a buffer. So most of the time an extra
pointer layer is just wasteful.
In the case of scriptin[curscript] in getchar.c, curscript used
to mean in practice:
N+1 open scripts when curscript>0
zero or one open scripts when curscript==0
Which means scriptin[0] had to be compared to NULL to disambiguate the
curscript=0 case.
Instead, use curscript==-1 to mean that are no script,
then all pointer comparisons dissappear and we can just use an array of
structs without extra pointers.
|
| |
| |
| |
| |
| |
| | |
Problems:
- Illegal bytes after valid UTF-8 char cause utf_cp_*_off() to fail.
- When stream isn't NUL-terminated, utf_cp_*_off() may go over the end.
Solution: Don't go over end of the char of end of the string.
|
| | |
|
| | |
|
|/ |
|
| |
|
|
|
|
|
| |
runtime(doc): fix inconsistent indent (vim/vim#14089)
https://github.com/vim/vim/commit/d086b8f646a67f6b16c46061ce773de1011b8ec7
|
|
|
|
|
|
| |
With "intermediate" flag, only using minimal timeout is too short and
may lead to failures.
Also remove the fallback timeout in screen:expect_unchanged(), as having
a different fallback timeout than screen:expect() is confusing.
|
|
|
|
|
| |
Assert that the buffer number passed to apply_text_edits is fully
resolved (not 0 or null). Pass the known buffer number to
apply_text_edits from lsp.formatexpr().
|
| |
|
|
|
|
|
|
|
|
|
| |
runtime(doc): clarify ':set[l] {option}<' behaviour
closes: vim/vim#14062
https://github.com/vim/vim/commit/374e26aba2e5e0a220b1a7ce1934b0eb5f493e6c
Co-authored-by: Matt Ellis <m.t.ellis@gmail.com>
|
|
|
|
|
|
|
|
|
| |
Problem: Insufficient testing for 'delcombine'.
Solution: Add test for both Normal and Insert modes without Arabic.
(zeertzjq)
closes: vim/vim#14086
https://github.com/vim/vim/commit/cd3a13e774823c44cf2e1e483d9e5b6df2cbcf50
|
|
|
|
|
| |
Downloading it from https://ftp.gnu.org/pub/gnu/ has started to become
unreliable and we can therefore no longer rely on it.
|