aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_getln.c
Commit message (Collapse)AuthorAge
...
* vim-patch:8.2.0316: ex_getln.c code has insufficient test coveragezeertzjq2022-07-02
| | | | | | 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
* cmdheight=0: fix bugs #18961Shougo2022-06-30
| | | | | | | | | | | | Continue of #16251 Fix #18953 Fix #18960 Fix #18958 Fix #18955 Fix #18970 Fix #18983 Fix #18995 Fix #19112
* Merge pull request #19133 from famiu/feat/api/cmd_support_filterbfredl2022-06-29
|\ | | | | feat(api): make `nvim_parse_cmd` and `nvim_cmd` support :filter
| * feat(api): make `nvim_parse_cmd` and `nvim_cmd` support :filterFamiu Haque2022-06-28
| | | | | | | | | | | | Also fixes a memory leak in `parse_cmdline`. Closes #18954.
* | refactor(map): simplify add_map paramsbfredl2022-06-28
|/
* refactor: replace char_u #18429dundargoc2022-06-28
| | | Work on https://github.com/neovim/neovim/issues/459
* fix(inccommand): parse the command to check if it is previewableFamiu Haque2022-06-28
| | | | | Free regprog if command isn't previewable Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* refactor: move some mapping-related code to a separate file (#19061)zeertzjq2022-06-23
| | | | | | | | | | | | | | | | | | | 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().
* perf(ui): reduce allocation overhead when encoding "redraw" eventsbfredl2022-06-20
| | | | | | | | | | | | | | | | | 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.
* vim-patch:8.2.1898: command modifier parsing always uses global cmdmodzeertzjq2022-06-14
| | | | | | 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
* fix(inccommand): never preview if parsing command failed (#18944)zeertzjq2022-06-14
| | | | `errormsg` is not always set when parsing the command failed (e.g. when the range contains invalid marks). Check the return value is better.
* feat: cmdheight=0 #16251Shougo2022-06-13
| | | | | | | | | 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
* fix(inccommand): skip split window if not enough room #18937Famiu Haque2022-06-12
| | | | | 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'.
* fix(inccommand): clear cmdpreview state if preview is not shown (#18923)zeertzjq2022-06-11
|
* docs: fix typos (#18269)dundargoc2022-06-04
| | | | | | | | | | 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>
* fix(inccommand): avoid crash if callback changes inccommand option (#18830)zeertzjq2022-06-02
| | | | | | | | | 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
* refactor(checkhealth)!: rename to vim.health, move logic to Lua #18720Javier Lopez2022-05-31
| | | | | | | | | - 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.
* feat: add preview functionality to user commandsFamiu Haque2022-05-31
| | | | Adds a Lua-only `preview` flag to user commands which allows the command to be incrementally previewed like `:substitute` when 'inccommand' is set.
* refactor(uncrustify): set maximum number of consecutive newlines to 2 (#18695)dundargoc2022-05-25
|
* refactor!: delete insertmode (#18547)Gregory Anders2022-05-22
| | | | | | | 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'
* vim-patch:8.2.4975: recursive command line loop may cause a crash (#18614)zeertzjq2022-05-18
| | | | | | | 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.
* refactor: replace char_u variables and functions with charDundar Goc2022-05-16
| | | | Work on https://github.com/neovim/neovim/issues/459
* Merge pull request #18489 from dundargoc/refactor/remove-char_ubfredl2022-05-13
|\ | | | | refactor: replace char_u variables and functions with char
| * refactor: replace char_u variables and functions with charDundar Goc2022-05-11
| | | | | | | | Work on https://github.com/neovim/neovim/issues/459
* | refactor: rename keymap.{c,h} to keycodes.{c,h} (#18535)zeertzjq2022-05-12
| | | | | | | | | | | | | | | | 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".
* | Merge pull request #18366 from famiu/feat/api/nvim_cmdbfredl2022-05-11
|\ \ | |/ |/| feat(api): add `nvim_cmd`
| * feat(api): add `nvim_cmd`Famiu Haque2022-05-11
| | | | | | | | 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.
* | vim-patch:8.2.4911: the mode #defines are not clearly named (#18499)zeertzjq2022-05-10
|/ | | | | | | | 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.
* refactor: replace char_u variables and functions with charDundar Goc2022-05-09
| | | | Work on https://github.com/neovim/neovim/issues/459
* feat: cmdline funcs (#18284)Shougo2022-05-09
| | | | | | | | | | | | | | 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
* refactor(grid): move out grid_* functions from screen.cbfredl2022-05-08
| | | | | Also normalize some types. use "size_t" for unsigned array offsets. Fix -Wconversion issues missed as screen.c is missing this check.
* refactor: replace char_u variables and functions with charDundar Goc2022-05-07
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-05-05
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-05-04
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-05-03
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-04-30
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with char (#18288)dundargoc2022-04-30
| | | Work on https://github.com/neovim/neovim/issues/459
* refactor(uncrustify): change rules to better align with the style guideDundar Goc2022-04-29
| | | | | | | | | | | | | 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.
* vim-patch:8.1.2346: CTRL-R CTRL-R doesn't work with modifyOtherKeyszeertzjq2022-04-29
| | | | | | | | | 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.
* revert: "refactor: Remove allow_keys global (#6346)"zeertzjq2022-04-29
|
* feat(edit): insert an unsimplified key using CTRL-SHIFT-Vzeertzjq2022-04-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* vim-patch:8.2.2476: using freed memory when splitting window while closing ↵zeertzjq2022-04-21
| | | | | | | | | | | | | 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.
* Merge pull request #18091 from dundargoc/refactor/pure-attributebfredl2022-04-18
|\ | | | | refactor: add pure attribute to pure functions
| * refactor: add pure attribute to pure functionsDundar Göc2022-04-13
| | | | | | | | | | This will allow compilers that support the pure attribute to make further optimizations to functions.
* | docs: typo fixes (#17859)dundargoc2022-04-15
|/ | | | | | | | | | 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>
* vim-patch:8.2.4723: the ModeChanged autocmd event is inefficientzeertzjq2022-04-10
| | | | | | | | | 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.
* vim-patch:8.2.0004: get E685 and E931 if buffer reload is interruptedzeertzjq2022-04-08
| | | | | | 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
* vim-patch:8.2.3471: crash when using CTRL-T after an empty search patternzeertzjq2022-04-01
| | | | | | 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
* vim-patch:8.1.0439: recursive use of getcmdline() still not protected (#17726)zeertzjq2022-03-30
| | | | | | | | | | | | 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.
* vim-patch:8.1.1693: syntax coloring and highlighting is in one big file (#17721)Lewis Russell2022-03-18
| | | | | | | | | | | 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>