| Commit message (Collapse) | Author | Age |
... | |
|
|
|
|
|
| |
Problem: ex_getln.c code has insufficient test coverage.
Solution: Add more tests. Fix a problem. (Yegappan Lakshmanan, closes vim/vim#5693)
https://github.com/vim/vim/commit/8d588ccee57390aa01c2395fc599bbe6506ee13a
|
|
|
|
|
|
|
|
|
|
|
|
| |
Continue of #16251
Fix #18953
Fix #18960
Fix #18958
Fix #18955
Fix #18970
Fix #18983
Fix #18995
Fix #19112
|
|\
| |
| | |
feat(api): make `nvim_parse_cmd` and `nvim_cmd` support :filter
|
| |
| |
| |
| |
| |
| | |
Also fixes a memory leak in `parse_cmdline`.
Closes #18954.
|
|/ |
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
|
| |
Free regprog if command isn't previewable
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This marks the following Vim patches as ported:
vim-patch:8.1.1785: map functionality mixed with character input
Problem: Map functionality mixed with character input.
Solution: Move the map functionality to a separate file. (Yegappan
Lakshmanan, closes vim/vim#4740) Graduate the +localmap feature.
https://github.com/vim/vim/commit/b66bab381c8ba71fd6e92327d1d34c6f8a65f2a7
vim-patch:8.2.3643: header for source file is outdated
Problem: Header for source file is outdated.
Solution: Make the header more accurate. (closes vim/vim#9186)
https://github.com/vim/vim/commit/a3f83feb63eae5464a620ae793c002eb45f7a838
Also cherry-pick a change for <unique> mappings from patch 8.2.0807.
Rename map_clear_mode() to do_mapclear().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Note for external UIs: Nvim can now emit multiple "redraw" event batches
before a final "flush" event is received. To retain existing behavior,
clients should make sure to update visible state at an explicit "flush"
event, not just the end of a "redraw" batch of event.
* Get rid of copy_object() blizzard in the auto-generated ui_event layer
* Special case "grid_line" by encoding screen state directly to
msgpack events with no intermediate API events.
* Get rid of the arcane notion of referring to the screen as the "shell"
* Array and Dictionary are kvec_t:s, so define them as such.
* Allow kvec_t:s, such as Arrays and Dictionaries, to be allocated with
a predetermined size within an arena.
* Eliminate redundant capacity checking when filling such kvec_t:s
with values.
|
|
|
|
|
|
| |
Problem: Command modifier parsing always uses global cmdmod.
Solution: Pass in cmdmod_T to use. Rename struct fields consistently.
https://github.com/vim/vim/commit/e10044015841711b989f9a898d427bcc1fdb4c32
|
|
|
|
| |
`errormsg` is not always set when parsing the command failed (e.g. when
the range contains invalid marks). Check the return value is better.
|
|
|
|
|
|
|
|
|
| |
Fix https://github.com/neovim/neovim/issues/1004
Limitation: All outputs need hit-enter prompt.
Related:
https://github.com/neovim/neovim/pull/6732
https://github.com/neovim/neovim/pull/4382
|
|
|
|
|
| |
Command preview now behaves like inccommand=nosplit when there's not
enough room for the preview window to be opened instead of aborting,
which is consistent with old behavior of 'inccommand'.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: Dan Sully <dan+github@sully.org>
Co-authored-by: saher <msaher.shair@gmail.com>
Co-authored-by: Stephan Seitz <stephan.seitz@fau.de>
Co-authored-by: Benedikt Müller <d12bb@posteo.de>
Co-authored-by: Andrey Mishchenko <mishchea@gmail.com>
Co-authored-by: Famiu Haque <famiuhaque@protonmail.com>
Co-authored-by: Oliver Marriott <hello@omarriott.com>
|
|
|
|
|
|
|
|
|
| |
clang: Result of operation is garbage or undefined
clang: Uninitialized argument value
Also check for == 's' instead of != 'n' as it is more straightforward.
Also fix another unrelated PVS warning:
PVS/V1071: Return value of win_comp_pos() is not always used
|
|
|
|
|
|
|
|
|
| |
- Complete function:
There was lots of unnecessary C code for the complete function, therefore
moving it to Lua and use all the plumbing we have in place to retrieve the
results.
- Moving the module:
It's important we keep nvim lua modules name spaced, avoids conflict with
plugins, luarocks, etc.
|
|
|
|
| |
Adds a Lua-only `preview` flag to user commands which allows the command to be incrementally previewed like `:substitute` when 'inccommand' is set.
|
| |
|
|
|
|
|
|
|
| |
Neovim already removed `evim` (or any similar flags). The 'insertmode'
option is a weird remnant, so get rid of it.
The 'insertmode' option is replaced with a script that closely emulates
the option. This script is documented at :help 'insertmode'
|
|
|
|
|
|
|
| |
Problem: Recursive command line loop may cause a crash.
Solution: Limit recursion of getcmdline().
https://github.com/vim/vim/commit/51f0bfb88a3554ca2dde777d78a59880d1ee37a8
Cherry-pick e_command_too_recursive from patch 8.2.3957.
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|\
| |
| | |
refactor: replace char_u variables and functions with char
|
| |
| |
| |
| | |
Work on https://github.com/neovim/neovim/issues/459
|
| |
| |
| |
| |
| |
| |
| |
| | |
Most code in keymap.h is for keycode definitions, while most code in
keymap.c is for the parsing and conversion of keycodes.
The name "keymap" may also make people think these two files are for
mappings, while in fact keycodes are used even when no mappings are
involved, so "keycodes" should be a better file name than "keymap".
|
|\ \
| |/
|/| |
feat(api): add `nvim_cmd`
|
| |
| |
| |
| | |
Adds the API function `nvim_cmd` which allows executing an Ex-command through a Dictionary which can have the same values as the return value of `nvim_parse_cmd()`. This makes it much easier to do things like passing arguments with a space to commands that otherwise may not allow it, or to make commands interpret certain characters literally when they otherwise would not.
|
|/
|
|
|
|
|
|
| |
Problem: The mode #defines are not clearly named.
Solution: Prepend MODE_. Renumber them to put the mapped modes first.
https://github.com/vim/vim/commit/249591057b4840785c50e41dd850efb8a8faf435
A hunk from the patch depends on patch 8.2.4861, which hasn't been
ported yet, but that should be easy to notice.
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
vim-patch:8.2.4903: cannot get the current cmdline completion type and position
Problem: Cannot get the current cmdline completion type and position.
Solution: Add getcmdcompltype() and getcmdscreenpos(). (Shougo Matsushita,
closes vim/vim#10344)
https://github.com/vim/vim/commit/79d599b8772022af1d657f368c2fc97aa342c0da
vim-patch:8.2.4910: imperfect coding
Problem: Imperfect coding.
Solution: Make code nicer.
https://github.com/vim/vim/commit/9ff7d717aa3176de5c61de340deb93f41c7780fc
|
|
|
|
|
| |
Also normalize some types. use "size_t" for unsigned array offsets.
Fix -Wconversion issues missed as screen.c is missing this check.
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add space around arithmetic operators '+' and '-'.
Remove space between back-to-back parentheses, i.e. ')(' vs. ') ('.
Remove space between '((' or '))' of control statements.
Add space between ')' and '{' of control statements.
Remove space between function name and '(' on function declaration.
Collapse empty blocks between '{' and '}'.
Remove newline at the end of the file.
Remove newline between 'enum' and '{'.
Remove newline between '}' and ')' in a function invocation.
Remove newline between '}' and 'while' of 'do' statement.
|
|
|
|
|
|
|
|
|
| |
Problem: CTRL-R CTRL-R doesn't work with modifyOtherKeys.
Solution: Allow key codes when fetching argument for CTRL-R. (closes vim/vim#5266)
Also fix CTRL-G in Insert mode.
https://github.com/vim/vim/commit/38571a04b4eb2853f46df8884750bcb9a8115db8
Omit test as it sends terminal codes. Use a Lua test instead.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This marks the following Vim patches as ported:
vim-patch:8.1.2333: with modifyOtherKeys CTRL-^ doesn't work
Problem: With modifyOtherKeys CTRL-^ doesn't work.
Solution: Handle the exception.
https://github.com/vim/vim/commit/828ffd596394f714270a01a55fc3f949a8bd9b35
vim-patch:8.1.2350: other text for CTRL-V in Insert mode with modifyOtherKeys
Problem: Other text for CTRL-V in Insert mode with modifyOtherKeys.
Solution: Convert the Escape sequence back to key as if modifyOtherKeys is
not set, and use CTRL-SHIFT-V to get the Escape sequence itself.
(closes vim/vim#5254)
https://github.com/vim/vim/commit/fc4ea2a72d36de1196a3ce17352e72f8fe90f4bb
vim-patch:8.2.2084: CTRL-V U doesn't work to enter a Unicode character
Problem: CTRL-V U doesn't work to enter a Unicode character when
modifyOtherKeys is effective. (Ken Takata)
Solution: Add a flag to get_literal() for the shift key. (closes vim/vim#7413)
https://github.com/vim/vim/commit/0684e36a7ee0743f2889698fb8e0e14f7acae423
Omit getcmdkeycmd() change as it depends on Vim patch 8.2.2062, which
may introduce a potential breakage.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
buffer
Problem: Using freed memory when using an autocommand to split a window
while a buffer is being closed.
Solution: Disallow splitting when the buffer has b_locked_split set.
https://github.com/vim/vim/commit/983d83ff1cd796ff321074335fa53fbe7ac45a46
Put the error message in window.c.
Cherry-pick a memory leak fix from Vim patch 8.2.0399.
Test still fails.
|
|\
| |
| | |
refactor: add pure attribute to pure functions
|
| |
| |
| |
| |
| | |
This will allow compilers that support the pure attribute to make
further optimizations to functions.
|
|/
|
|
|
|
|
|
|
|
| |
Co-authored-by: Elias Alves Moura <eliamoura.alves@gmail.com>
Co-authored-by: venkatesh <shariharanvenkatesh@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: Vikas Raj <24727447+numToStr@users.noreply.github.com>
Co-authored-by: Steve Vermeulen <sfvermeulen@gmail.com>
Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
Co-authored-by: rwxd <rwxd@pm.me>
Co-authored-by: casswedson <58050969+casswedson@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
| |
Problem: The ModeChanged autocmd event is inefficient.
Solution: Avoid allocating memory. (closes vim/vim#10134) Rename
trigger_modechanged() to may_trigger_modechanged().
https://github.com/vim/vim/commit/2bf52dd065495cbf28e28792f2c2d50d44546d9f
Make v:event readonly for ModeChanged.
|
|
|
|
|
|
| |
Problem: Get E685 and E931 if buffer reload is interrupted.
Solution: Do not abort deleting a dummy buffer. (closes vim/vim#5361)
https://github.com/vim/vim/commit/a6e8f888e7fc31b8ab7233509254fb2e2fe4089f
|
|
|
|
|
|
| |
Problem: Crash when using CTRL-T after an empty search pattern.
Solution: Bail out when there is no previous search pattern. (closes vim/vim#8953)
https://github.com/vim/vim/commit/d8d957de86f218de9124ca1209548f8c6f61b69b
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Recursive use of getcmdline() still not protected.
Solution: Instead of saving the command buffer when making a call which may
cause recursiveness, save the buffer when actually being called
recursively.
https://github.com/vim/vim/commit/438d176e35c16d56ff3bb7a80300197ce5a30c4f
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Clear ccline earlier in save_cmdline() if ccline is in use so that
ccline.prev_ccline can be assigned.
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Syntax coloring and highlighting is in one big file.
Solution: Move the highlighting to a separate file. (Yegappan Lakshmanan,
closes vim/vim#4674)
https://github.com/vim/vim/commit/f9cc9f209ede9f15959e4c2351e970477c139614
Name the new file highlight_group.c instead.
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|