| Commit message (Collapse) | Author | Age |
... | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This allows vim.treesitter.show_tree() to work on buffers where the
filetype does not match the parser language name e.g, bash/sh.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Problem:
When not inside an Ex command, screen_resize() calls update_screen(),
which calls screenclear() and set the screen as valid. However, when
inside an Ex command, redrawing is postponed so update_screen() screen
doesn't do anything, and the screen is still invalid after the resize,
causing ui_comp_raw_line() to be no-op until update_screen() is called
on the main loop.
Solution:
Restore the call to screenclear() inside screen_resize() so that the
screen is invalid after screen_resize(). Since screenclear() changes
redraw type from UPD_CLEAR to UPD_NOT_VALID, it is called at most once
for each resize, so this shouldn't change how much code is run in the
common (not inside an Ex command) case.
|
| | | |
| | | |
| | | | |
Co-authored-by: Gregory Anders <greg@gpanders.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Problem: Inserting a register on the command line does not trigger
incsearch or update hlsearch.
Solution: Have cmdline_insert_reg() return CMDLINE_CHANGED when appropriate
and handle it correctly. (Ken Takata, closes vim/vim#11960)
https://github.com/vim/vim/commit/c4b7dec38292fe1cfad7aa5f244031fc6f7c7a09
Co-authored-by: K.Takata <kentkt@csc.jp>
|
| |_|/
|/| |
| | |
| | | |
BREAKING CHANGE: Unsaved changes are now preserved rather than discarded
when stdio channel is closed.
|
| | | |
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
Eliminates lua-client and non-static libluv as test time dependencies
Note: the API for a public lua-client is not yet finished.
The interface needs to be adjusted to work in the embedded loop
of a nvim instance (to use it to talk between instances)
|
| |
| |
| |
| |
| | |
Previously, if the autocommands are not triggered, the tests may still
pass because no assertion is done. Add an assertion so that the tests
will fail if the autocommands aren't triggered.
|
| |
| |
| |
| | |
When a TUI client has already stopped, handling UI events will cause a
heap-use-after-free, so ignore them.
|
| |
| |
| | |
Otherwise it will crash.
|
| |
| |
| | |
Fixes: #22127
|
| | |
|
| |
| |
| |
| | |
Co-authored-by: Lewis Russell <lewis6991@gmail.com>
|
|/
|
|
|
|
|
|
| |
Problem: Display shows lines scrolled down erroneously. (Yishai Lerner)
Solution: Do not change "wl_lnum" at index zero. (closes vim/vim#11938)
https://github.com/vim/vim/commit/61fdbfa1e3c842252b701aec12f45839ca41ece5
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|\
| |
| | |
fix(extmarks): adjust extmarks when inserting prompt prefix
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: The 'statuscolumn' width is being estimated without the
proper context. In particular, this resulted in the fact
that a custom fold column could be included in the estimated
`number_width()`, and doubly added when actually drawing the
statuscolumn due to `win_col_off()` also adding the
`'foldcolumn'` width. Resulting in a status column that is
`'foldcolumn'` cells wider than necessary.
Solution: Estimate 'statuscolumn' width in `get_statuscol_str()` when
a buffer's line count has changed.
|
| |
| |
| |
| | |
This prevents the TUI from doing unexpected things when receiving a
deadly signal or running out of memory.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
fix(man): use italics for <bs>_
Even though underline is strictly what this should be. <bs>_ was used by
nroff to indicate italics which wasn't possible on old typewriters so
underline was used. Modern terminals now support italics so lets use
that now.
See:
- https://unix.stackexchange.com/questions/274658/purpose-of-ascii-text-with-overstriking-file-format/274795#274795
- https://cmd.inp.nsk.su/old/cmd2/manuals/unix/UNIX_Unleashed/ch08.htm
|
|\ \
| | |
| | | |
refactor(tests): run unittests using main nvim binary - delete separate nvim-test build
|
| | |
| | |
| | |
| | | |
This allows us to get rid of the separate "nvim-test" target
|
|\ \ \
| |/ /
|/| | |
fix(treesitter): validate language name
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem: Some injections (like markdown) allow specifying arbitrary
language names for code blocks, which may be lead to errors when
looking for a corresponding parser in runtime path.
Solution: Validate that the language name only contains alphanumeric
characters and `_` (e.g., for `c_sharp`) and error otherwise.
|
| | |
| | |
| | |
| | |
| | | |
This fixes "fake server" from leaking memory, which makes ASAN very
upset, except on current ASAN CI for some reason.
|
|/ / |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
test(exepath): test if exepath returns correct path with multiple
Windows shells
This test covers the changes from #21175 where exepath() is set to
prefer file extensions in powershell.exe aswell as in cmd.exe.
In both shells, the file with a valid extension should be returned
instead of the extensionless file.
|
| | |
|
| | |
|
| |
| |
| |
| | |
Saves two bits for reuse for new features
|
| |
| |
| |
| |
| |
| |
| |
| | |
(#21921)" (#21979)
This reverts commit 0371d0f7afa5e01dd2ac8bbd3abcf0f7454872b3.
> 'bufhidden' option exists. I don't think we should assume autoclosing
windows are fine just because 'hidden' is set.
|
| | |
|
| |
| |
| |
| |
| |
| | |
`vim.lsp.buf.format()` silently did nothing if no servers supported
`textDocument/rangeFormatting` when formatting with a range.
Issue found by `@hwrd:matrix.org` in the Matrix chat.
|
| |
| |
| |
| |
| | |
This reverts commit 8b8ecf44f2cda43bbd710ec22ef99439b71888cd.
It is causing performance problems on exit.
Fix #21082.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
The "force" flag of win_close() complicates the code and adds edge cases
where it is not clear what the correct behavior should be.
The "free_buf" flag of win_close() is passed on to float windows when
closing the last window of a tabpage, which doesn't make much sense.
Solution:
Remove the "force" flag and always close float windows as if :close! is
used when closing the last window of a tabpage, and set the "free_buf"
flag for a float window based on whether its buffer can be freed.
As 'hidden' is on by default, this change shouldn't affect many people.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
Build is not reproducible, because generated source files (.c/.h/) are not
deterministic, mostly because Lua pairs() is unordered by design (for security).
https://github.com/LuaJIT/LuaJIT/issues/626#issuecomment-707005671
https://www.lua.org/manual/5.1/manual.html#pdf-next
> The order in which the indices are enumerated is not specified [...]
>
>> The hardening of the VM deliberately randomizes string hashes. This in
>> turn randomizes the iteration order of tables with string keys.
Solution:
- Update the code generation scripts to be deterministic.
- That is only a partial solution: the exported function
(funcs_metadata.generated.h) and ui event
(ui_events_metadata.generated.h) metadata have some mpack'ed
tables, which are not serialized deterministically.
- As a workaround, introduce `PRG_GEN_LUA` cmake setting, so you can
inject a modified build of luajit (with LUAJIT_SECURITY_PRN=0)
that preserves table order.
- Longer-term we should change the mpack'ed data structure so it no
longer uses tables keyed by strings.
Closes #20124
Co-Authored-By: dundargoc <gocdundar@gmail.com>
Co-Authored-By: Arnout Engelen <arnout@bzzt.net>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: When a folded line has virtual lines attached, the following
problems occur:
- The virtual lines are drawn empty.
- The 'foldtext' line is drawn empty.
- The cursor is drawn incorrectly.
Solution: Check whether virtual lines belong to a folded line.
Fix #17027
Fix #19557
Fix #21837
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
| |
| |
| | |
to ease debug. At one point I had an empty filetype and the current message was not helpful enough
|
| |
| |
| |
| | |
This just removes DIP_LUA and always executes its branches.
Also add tests for cmdline completion for other lua runtime files.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Some tests fail when run under valgrind.
Solution: Increase timeouts.
https://github.com/vim/vim/commit/353c351bd22e4dac4c3ae9cd7731032348f248c4
Cherry-pick Test_pum_with_preview_win() from patch 8.2.0011.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| | |
Also fix the race between output and resize in the test for this.
|
| |
| |
| |
| | |
There may be a race between resizes, so don't expect exact screen.
Expect window width instead.
|
| |
| |
| |
| |
| | |
Actually execute the command.
Don't use assert_alive() as it checks the host session instead of the
child session. Use screen:expect() instead.
|
| |
| |
| | |
This makes it clear on test failure what the attributes are.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: 'statuscolumn' click definitions are cleared, evaluated,
allocated and filled each redraw for every row in a window.
This despite the fact that we only store a single click
definition array for the entire column as opposed to one
for each row.
Solution: Only fill the 'statuscolumn' click definition array once per
window per redraw.
Resolve https://github.com/neovim/neovim/issues/21767.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Command line completion popup menu positioned wrong when using a
terminal window.
Solution: Position the popup menu differently when editing the command line.
(Yegappan Lakshmanan, closes vim/vim#10050, closes vim/vim#10035)
https://github.com/vim/vim/commit/1104a6d0c2004d39e9b6cb8f804d12b628a69869
The test in the patch looks a bit hard to understand.
Add a Lua test that is more straightforward.
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
| | |
|
| |
| |
| |
| |
| | |
A zero-width click label isn't assigned to any click definition, so its
function name should be freed when filling click definitions.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
(#21883)
Problem: Cannot lock a variable in legacy Vim script like in Vim9.
Solution: Make ":lockvar 0" work.
https://github.com/vim/vim/commit/a187c43cfe8863d48b2159d695fedcb71f8525c1
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Click definitions are always filled for tabline, statusline and winbar,
so they should also be always filled for statuscolumn, otherwise it will
leak memory.
Note: this doesn't actually change the existing code much, because of a
typo in the existing code.
|
| | |
|