| Commit message (Collapse) | Author | Age |
... | |
|
|
|
|
|
|
| |
Problem: Marks that go beyond the end of the buffer, and paired marks
whose end is in front of its start mark are added to and
removed from the decor. This results in incorrect tracking
of the signcolumn.
Solution: Ensure such marks are not added to and removed from the decor.
|
|
|
|
|
| |
Temporary measure for the stable release. Re-enable for nightly after
0.11 release.
|
|
|
|
|
|
|
| |
Problem: Virtual 'statuscolumn' lines are evaluated with a misleading v:(rel)num.
Namely set to the line above for `virt_lines_above = true` lines, or even
the last drawn line for a partial redraw.
Solution: Set `v:lnum` for the first evaluated row of a line, first above
virtual line of a row and first non-virtual line of a row.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Co-authored-by: Au. <acehinnnqru@gmail.com>
Co-authored-by: Daniel Rainer <daniel.rainer@localhost>
Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
Co-authored-by: Lewis Russell <lewis6991@gmail.com>
Co-authored-by: Luuk van Baal <luukvbaal@gmail.com>
Co-authored-by: Pierre Barbin <pierre@heitzsystem.com>
Co-authored-by: Riley Bruins <ribru17@hotmail.com>
Co-authored-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Co-authored-by: phanium <91544758+phanen@users.noreply.github.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
|
|
|
| |
Assuming that completeopt=popup does what its documentation claims, it
is more appropriate that completeopt=preview as a default.
|
|
|
|
|
|
| |
Problem: No block events emitted with ext_cmdline for :if, :while, :try etc.
Solution: Emit cmdline block events; store the indent level of the
previous cmdline and whether a block event was emitted.
|
|
|
|
|
|
|
|
|
|
| |
pum (#32903)
Problem: completion: preinserted text not removed when closing pum
Solution: delete preinsert text inside in ins_compl_stop() (glepnir).
closes: vim/vim#16891
https://github.com/vim/vim/commit/84a7503e29dc248661efc98b6c59d2e911452d5c
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#32902)
Problem: MS-Windows: crash when passing long string to expand() with
'wildignorecase'.
Solution: Use the same buflen as unix_expandpath() in dos_expandpath().
Remove an unnecessary STRLEN() while at it (zeertzjq).
closes: vim/vim#16896
https://github.com/vim/vim/commit/00a749bd90e6b84e7e5132691d73fe9aa3fdff05
|
|
|
|
|
|
|
|
|
|
| |
Problem: Buffer overflow when expanding long file name.
Solution: Use a larger buffer and avoid overflowing it. (Yee Cheng Chin,
closes vim/vim#12201)
https://github.com/vim/vim/commit/a77670726e3706973adffc2b118f4576e1f58ea0
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
|
|
|
|
|
|
|
|
|
| |
Problem: Expanding path with "/**" may overrun end of buffer.
Solution: Use vim_snprintf().
https://github.com/vim/vim/commit/386c24cd262edac66a31add2fd989c96c4c2c952
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
| |
Keep track of the original indexes of both TAB and K_TAB, so that there
doesn't have to be an extra table and loop for K_TAB.
|
|
|
|
|
|
|
|
|
|
| |
Problem: Various list commands end in a newline to go to a new line on
the message grid for the prompt message, which is unwanted
with ext_messages.
Solution: Don't emit a trailing newline with ext_messages for
inputlist(), :tselect and z=.
Co-authored-by: Tomasz N <przepompownia@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
undefined (#32866)
Problem: inside try-block: fn body executed when default arg is
undefined
Solution: When inside a try-block do not execute function body after an
error in evaluating a default argument expression
(Shane Harper).
closes: vim/vim#16865
https://github.com/vim/vim/commit/2d18789aa67cc60072ea0cf21811c403fa0b2c7b
Co-authored-by: Shane Harper <shane@shaneharper.net>
|
|
|
|
|
|
|
|
|
|
|
|
| |
"umask" is pronounce like "youmask", so having an "an" before it is a
bit strange. In other places in the help, "umask" is not preceded by
either "a" or "an", and sometimes preceded by "the".
Also, "Note" is usually followed either by ":" or "that" in builtin.txt,
so add a ":" after "Note".
closes: 16860
https://github.com/vim/vim/commit/c1c3b5d6a0a3032057bf6de8672cc79100bb73c9
|
|
|
|
|
|
|
|
|
|
| |
Problem:
On Windows, the first attempt at finishing up after a terminal process
terminates is delayed by 200ms, even if it would be possible to finish
up immediately.
Solution:
Make the first attempt at finishing up immediately after the process
terminates.
|
|
|
|
|
| |
Problem: Custom inline function duplicated existing functionality
Solution: Used existing plines_m_win function to reduce code duplication
|
|
|
|
|
|
|
|
|
| |
(#32845)
fixes: vim/vim#16849
https://github.com/vim/vim/commit/0a336ccb57003c44ba303ccc50cf50cb640c2309
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
|
|
|
|
|
|
|
|
|
| |
When a UI detaches it will execute any UILeave events. Autocommands
cannot run in a libuv handler because they will in turn poll the event
loop, which results in recursive loop execution. So we schedule the
callback to detach the UI on the main event queue.
We also have to schedule the exit when the RPC channel is closed to
ensure it does not run until after `remote_ui_disconnect` has run,
otherwise it will hang.
|
|
|
|
|
|
|
|
|
| |
Problem: Cannot disable individual captures and patterns in treesitter queries.
Solution:
* Expose the corresponding tree-sitter API functions for `TSQuery` object.
* Add documentation for `TSQuery`.
* Return the pattern ID from `get_captures_at_pos()` (and hence `:Inspect!`).
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Unnecessary use of STRCAT() in au_event_disable(). STRCAT()
seeks to the end of new_ei, but here the end is already known.
Solution: Use STRCPY() and add p_ei_len to new_ei. Also fix a typo in a
comment. Add a test that 'eventignore' works in :argdo
(zeertzjq).
closes: vim/vim#16844
https://github.com/vim/vim/commit/969e11a18b145241dc0ab39fc1be7ed814655dfc
Cherry-pick p_ei_len from patch 9.1.0256.
|
|
|
|
|
|
| |
The name of Cmdwin* events were changed to CmdWin* in 8ed2dbf6e2802516501c11e72e5d6d977e6a07f3
without explanation. This commit changes them back.
This doesn't affect the creation or execution of autocommands. It only
affects the listing of autocommands.
|
| |
|
|
|
|
|
|
|
|
| |
Problem:
"use_float" in the if-condition causes a new buffer to be generated on every execution.
Solution:
- Remove the incorrect use_float check from the condition.
- Use buf_clear to properly clear the existing buffer.
|
| |
|
|
|
|
|
|
|
|
| |
This actually only affects the order in which Cmdline* and Cmdwin*
autocommands are listed, and it appears that the names of Cmdwin* were
changed to CmdWin* in 8ed2dbf6e2802516501c11e72e5d6d977e6a07f3 without
explanation.
Also, remove the final NULL element from the names table.
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: C indentation does not detect multibyte labels
Solution: Correctly skip over multibyte characters
(Anttoni Erkkilä)
closes: vim/vim#16770
https://github.com/vim/vim/commit/f4d87ff8883e5076633ef0ab0cf4d6e4beaddc5c
Co-authored-by: Anttoni Erkkilä <anttoni.erkkila@protonmail.com>
|
| |
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Cannot use "g<" mapping with ext_messages. Mapping displays
the scrollback buffer since the last command, but the
scrollback buffer is not populated with ext_messages.
Solution: With ext_messages; store messages in the history that otherwise
wouldn't be. Mark them as temporary messages to be deleted when
the scrollback buffer would be cleared. To this end, make the
message history a doubly-linked list such that messages can be
removed from an arbitrary position.
Outlook: Default ext_messages UI might not show the hit-enter prompt
so we want "g<" to work as a recommended way to show messages
for the last command (prompted by an indicator).
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
1. The original info text is truncated in pum_set_preview_text.
2. There is an extra newline character at the end of the info text.
3. Incorrect usage of plines_win leads to errors in calculating the window height.
Solution:
1. Improved string handling in pum_preview_set_text to safely process line content without modifying the original text. Now, the preview info is correctly preserved while splitting lines.
2. Do not append a trailing newline to the preview buffer when one is present at the end.
3. Set w_widher_inner in advance; otherwise, plines_win cannot correctly calculate the wrapped line height.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
"make lintdoc" is not validating vimdoc (:help) tags.
Solution:
- Call `lang_tree:parse()` to init the parser.
- Load netrw 🤢 explicitly, since it was moved to `pack/dist/opt/`.
- Fix invalid help tags.
|
| |
| |
| |
| |
| |
| |
| | |
This allows generated sources to be automatically rebuilt when modifying
hashy code.
Also, appending to NVIM_GENERATED_FOR_{HEADERS,SOURCES} in the middle of
custom commands is a bit strange. Move that after the custom commands.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Follow-up to #32768
This is slightly faster according to the benchmark.
This also makes it a build error if hashy is used incorrectly
(generating a case-insensitive hash function from mixed-case strings),
as duplicate case labels aren't allowed.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
(#32792)
Problem: Unnecessary use of vim_tolower() in vim_strnicmp_asc().
Solution: Use TOLOWER_ASC() instead (zeertzjq).
It was passing *s1 and *s2 to vim_tolower(). When char is signed, which
is the case on most platforms, c < 0x80 is always true, so it already
behaves the same as TOLOWER_ASC().
closes: vim/vim#16826
https://github.com/vim/vim/commit/b7dc5d3b6169efc8aa0b9d86476072877e74bc2c
Use this function for hashy case-insensitive lookup, as it's ASCII-only.
Note that this function doesn't cast TOLOWER_ASC() argument to uint8_t,
so it'll treat a UTF-8 byte as smaller than NUL. It doesn't matter, as
one of the strings being compared is ASCII-only, and its behavior still
leads to consistent ordering.
|
| |
| |
| |
| | |
After #32777 the aliases no longer need to come later, so the list of
autocommand names can be fully sorted.
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
These functions are allowed to be used downstream, they are just not API
stable.
|
| |
| |
| |
| |
| |
| |
| | |
It's no longer needed after #32152.
I'll not apply this change to Vim first, because Nvim's event name
aliases are a bit different from Vim.
After this change there is a small speedup in nvim_exec_autocmds as per
test/benchmark/autocmd_spec.lua.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Always allow the following four events to be nested, as they may contain
important information, and are triggered on the event loop, which may be
processed by a blocking call inside another autocommand.
- ChanInfo
- ChanOpen
- TermRequest
- TermResponse
There are some other events that are triggered on the event loop, but
they are mostly triggered by user actions in a UI client, and therefore
not very likely to happen during another autocommand, so leave them
unchanged for now.
|
| |
| |
| |
| |
| | |
This is slightly faster than the binary search as per the benchmark, and
allows handling the vim/vim#16821 situation in generator code.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: too many strlen() calls in misc2.c
Solution: refactor misc2.c and use bsearch() instead of a linear search
to find matches in the key_names_table array (John Marriott).
This commit changes misc2.c to use bsearch() to perform string searches of
the key_names_table array.
Implementation detail:
- Some entries in this array have alternate names. Add field alt_name to
point to the alternate name.
- Some entries in this array are only available if a given feature is
defined. Keep them in the array, but add a boolean field enabled to
indicate if the record can be used or not. If the feature is not
available, the corresponding enabled field is set to FALSE.
In my measurements running the test suite on a huge non-gui build on
linux, the number of string comparisons in get_special_key_code():
Before (linear search): 2,214,957
After (binary search): 297,770
A side effect of this is 1477 calls to STRLEN() in
get_special_key_name() for the same test run are no longer necessary.
closes: vim/vim#16788
https://github.com/vim/vim/commit/4a1e6dacbb2cc833353983bea7eac38191c9d3b4
Skip the mouse shape changes.
Co-authored-by: John Marriott <basilisk@internode.on.net>
|
| |
| |
| |
| | |
This allows easier refactoring.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
When a function like vim.wait() is used, we continuously drain the main
event queue until it is empty, never stopping for user input. This means
the libuv timer never runs and the terminal never gets refreshed, so
emit_termrequest continously reschedules itself onto the same event
queue, causing an infinite loop.
Solution:
Use a separate "pending" event queue, where events that require a
terminal refresh are temporarily placed. Drain this queue after a
terminal refresh and events are copied back onto the main queue. This
prevents infinite loops since the main event queue will always be able
to properly drain.
|
| |
| |
| |
| | |
Code that checks whether a `w_lines` entry has become invalid due to
a change in a folded line should now also check for concealed lines.
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Problem: Skipping over a concealed line for which `win_line()`
_should_ be called because it has `virt_lines_above = false`
lines associated with it.
Solution: Don't include such a line in `wl_lastlnum` from the line
above.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: terminal mode cursor refresh logic has too many edge cases where it
fails when events change curbuf.
Solution: change the logic. Introduce cursor_visible to TerminalState to more
reliably track if terminal mode has changed busy. Move visibility handling to
refresh_cursor and move its call in refresh_terminal to terminal_check to avoid
temporarily changed curbufs from influencing cursor state.
This has the effect of "debouncing" shape/visibility updates to once per
terminal state tick (with the final attributes taking effect, as expected). I
think this is OK, but as a result it may also be warranted to update when
redrawing during the same state tick (e.g: from events executing :redraw); this
can be added later, if wanted.
Also move previous tests to a more appropriate place.
|