aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_getln.c
Commit message (Collapse)AuthorAge
* Merge pull request #19360 from famiu/feat/multibuffer-inccommandbfredl2022-08-19
|\ | | | | feat: multibuffer preview support for inccommand
| * feat: multibuffer preview support for inccommandFamiu Haque2022-08-19
| | | | | | | | | | | | | | | | | | Allows preview callbacks to modify multiple buffers in order to show the preview. Previously, if multiple buffers were modified, only the current buffer would have its state restored. After this change, all buffers have their state restored after preview. Closes #19103.
* | vim-patch:8.1.2057: the screen.c file is much too bigLewis Russell2022-08-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: The screen.c file is much too big. Solution: Split it in three parts. (Yegappan Lakshmanan, closes vim/vim#4943) https://github.com/vim/vim/commit/7528d1f6b5422750eb778dfb550cfd0b0e540964 This is an approximation vim-patch 8.1.2057. Applying the patch directly isn't feasible since our version of screen.c has diverged too much, however we still introduce drawscreen.c and drawline.c: - screen.c is now a much smaller file used for low level screen functions - drawline.c contains everything needed for win_line() - drawscreen.c contains everything needed for update_screen() Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* | vim-patch:8.1.2082: rename popupmnu.* to popupmenu.* (#19829)zeertzjq2022-08-18
| | | | | | | | | | | | | | vim-patch:8.1.2082: some files have a weird name to fit in 8.3 characters Problem: Some files have a weird name to fit in 8.3 characters. Solution: Use a nicer names. https://github.com/vim/vim/commit/30e8e73506e4522ef4aebf7d525c0e6ffe8805fd
* | refactor: remove some unused includes (#19820)zeertzjq2022-08-17
| | | | | | Replace grid.h in screen.h and screen.h in buffer.h with grid_defs.h
* | vim-patch:8.2.1262: src/ex_cmds.c file is too big (#19811)zeertzjq2022-08-17
| | | | | | | | | | | | Problem: src/ex_cmds.c file is too big. Solution: Move help related code to src/help.c. (Yegappan Lakshmanan, closes vim/vim#6506) https://github.com/vim/vim/commit/f868ba89039045b25efe83d12ca501d657e170e8
* | refactor: change pre-decrement/increment to post (#19799)Lewis Russell2022-08-16
| | | | | | Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* | vim-patch:8.1.1869: code for the argument list is spread out (#19791)zeertzjq2022-08-16
| | | | | | | | | | | | Problem: Code for the argument list is spread out. Solution: Put argument list code in arglist.c. (Yegappan Lakshmanan, closes vim/vim#4819) https://github.com/vim/vim/commit/4ad62155a1015751a6645aaecd94b02c94c8934b
* | vim-patch:8.2.3392: augroup completion escapes regexp pattern characterszeertzjq2022-08-15
|/ | | | | | Problem: augroup completion escapes regexp pattern characters. Solution: Do not escape the augroup name. (closes vim/vim#8826) https://github.com/vim/vim/commit/b4d82e2a8d610c00139a74970df772eece2daf1c
* refactor: replace char_u with charDundar Goc2022-08-12
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: move code dealing with script files to runtime.c (#19734)zeertzjq2022-08-12
| | | | | | | vim-patch:8.1.1927: code for dealing with script files is spread out Problem: Code for dealing with script files is spread out. Solution: Move the code to scriptfile.c. (Yegappan Lakshmanan, closes vim/vim#4861) https://github.com/vim/vim/commit/307c5a5bb77c3728dfab06c30e9f786309c63f74
* vim-patch:8.1.1684: profiling functionality is spread outzeertzjq2022-08-12
| | | | | | | | | Problem: Profiling functionality is spread out. Solution: Put profiling functionality in profiling.c. (Yegappan Lakshmanan, closes vim/vim#4666) https://github.com/vim/vim/commit/fa55cfc69d2b14761e2a8bd85bc1e0d82df770aa Move proftime_T to types.h for now to avoid recursive #include.
* refactor: use CLEAR_FIELD and CLEAR_POINTER macros (#19709)zeertzjq2022-08-11
| | | | | | | vim-patch:8.2.0559: clearing a struct is verbose Problem: Clearing a struct is verbose. Solution: Define and use CLEAR_FIELD() and CLEAR_POINTER(). https://github.com/vim/vim/commit/a80faa8930ed5a554beeb2727762538873135e83
* vim-patch:8.1.1823: command line history code is spread out (#19688)zeertzjq2022-08-09
| | | | | | Problem: Command line history code is spread out. Solution: Put the code in a new file. (Yegappan Lakshmanan, closes vim/vim#4779) Also graduate the +cmdline_hist feature. https://github.com/vim/vim/commit/d7663c22c6c1ff0f86b81371586fbc851d3a3e9e
* vim-patch:8.2.1281: the "trailing characters" error can be hard to understandzeertzjq2022-08-07
| | | | | | Problem: The "trailing characters" error can be hard to understand. Solution: Add the trailing characters to the message. https://github.com/vim/vim/commit/2d06bfde29bd3a62fc85823d2aa719ef943bd319
* Merge pull request #19437 from dundargoc/refactor/char_u-to-charbfredl2022-07-31
|\ | | | | refactor: replace char_u with char
| * refactor: replace char_u with charDundar Goc2022-07-31
| | | | | | | | Work on https://github.com/neovim/neovim/issues/459
* | vim-patch:9.0.0115: when 'cmdheight' is zero pressing ':' may scroll a windowShougo Matsushita2022-07-31
| | | | | | | | | | | | Problem: When 'cmdheight' is zero pressing ':' may scroll a window. Solution: Add the made_cmdheight_nonzero flag and set 'scrolloff' to zero. https://github.com/vim/vim/commit/6747cf1671bd41cddee77c65b3f9a70509f968db
* | vim-patch:9.0.0114: the command line takes up space even when not usedShougo Matsushita2022-07-31
| | | | | | | | | | | | | | | | | | | | | | Problem: The command line takes up space even when not used. Solution: Allow for 'cmdheight' to be set to zero. (Shougo Matsushita, closes vim/vim#10675, closes vim/vim#940) https://github.com/vim/vim/commit/f39cfb72629f3e7fefaf578a3faa2619cd0654f8 Omit win_redr_ruler() change: winbar may still need redraw. Omit win_update() changes: Nvim doesn't use `Rows` there. Omit redraw_asap(): removed.
* | cmdheight=0: fix bugs part2 (#19185)Shougo2022-07-31
|/
* vim-patch:9.0.0099: scrollback can be wrong after redrawing the command line ↵zeertzjq2022-07-28
| | | | | | | (#19562) Problem: Scrollback can be wrong after redrawing the command line. Solution: Clear unfinished scrollback when redrawing. (closes vim/vim#10807) https://github.com/vim/vim/commit/46af7bc08debbf408d025680eeef136fb3b528ef
* refactor: fix clang and PVS warnings (#19532)zeertzjq2022-07-28
|
* vim-patch:9.0.0086: tabline is not redrawn when entering command linezeertzjq2022-07-27
| | | | | | Problem: Tabline is not redrawn when entering command line. Solution: Set "redraw_tabline". (closes vim/vim#10771) https://github.com/vim/vim/commit/6791adca53981666f0cf23e264e102b795224044
* vim-patch:9.0.0083: ModeChanged event not triggered when leaving cmdline windowzeertzjq2022-07-27
| | | | | | | | Problem: ModeChanged event not triggered when leaving the cmdline window. Solution: Call may_trigger_modechanged(). (closes vim/vim#10791) https://github.com/vim/vim/commit/c9e8fd6fc7d2027d0645b376d95a6ed51098036c Code is already present in Nvim. Add some other related missing changes.
* vim-patch:9.0.0082: cannot interrupt global command from command linezeertzjq2022-07-27
| | | | | | Problem: Cannot interrupt global command from command line. Solution: Reset got_int in another place. (closes vim/vim#10739) https://github.com/vim/vim/commit/3cfae39b087c2724991d385e5e8ee7d011aa8e99
* vim-patch:9.0.0051: using CTRL-C wih :append may hang Vimzeertzjq2022-07-27
| | | | | | Problem: Using CTRL-C wih :append may hang Vim. Solution: Reset got_int. (closes vim/vim#10729, closes vim/vim#10728) https://github.com/vim/vim/commit/f754fe6a3d5384b5146c38a32db6da9d46e00c40
* fix(cmdline): trigger CmdlineEnter and ModeChanged earlier (#19474)zeertzjq2022-07-26
| | | | Match Vim's ordering in code. These tests are unrelated to ext_cmdline. Move them out of that block.
* refactor: move FunPtr to types.h (#19466)zeertzjq2022-07-22
| | | | | This type itself is not eval-specific. Moving it to types.h can avoid including eval/funcs.h in many headers, and types.h is already included by many headers.
* vim-patch:8.2.2426: allowing 'completefunc' to switch windows causes troublezeertzjq2022-07-17
| | | | | | | | | | | | | | | | | | | | | | Problem: Allowing 'completefunc' to switch windows causes trouble. Solution: use "textwinlock" instead of "textlock". https://github.com/vim/vim/commit/28976e2accf11591c60e8a658a9e03544f0408b2 Assert E565 instead of E578. vim-patch:8.2.0670: cannot change window when evaluating 'completefunc' Problem: Cannot change window when evaluating 'completefunc'. Solution: Make a difference between not changing text or buffers and also not changing window. https://github.com/vim/vim/commit/6adb9ea0a6ca01414f4b591f379b0f829a8273c0 vim-patch:8.2.5029: "textlock" is always zero Problem: "textlock" is always zero. Solution: Remove "textlock" and rename "textwinlock" to "textlock". (closes vim/vim#10489) https://github.com/vim/vim/commit/cfe456543e840d133399551f8626d985e1fb1958
* fix(cmdline): fix passing -1 as charzeertzjq2022-07-12
|
* vim-patch:8.2.3530: ":buf \{a}" fails while ":edit \{a}" workszeertzjq2022-07-10
| | | | | | Problem: ":buf \{a}" fails while ":edit \{a}" works. Solution: Unescape "\{". (closes vim/vim#8917) https://github.com/vim/vim/commit/21c1a0c2f10575dbb72fa873d33f0c1f6e170aa7
* vim-patch:8.1.1038: Arabic support excludes Farsi (#19285)zeertzjq2022-07-10
| | | | | | | | Problem: Arabic support excludes Farsi. Solution: Add Farsi support to the Arabic support. (Ali Gholami Rudi, Ameretat Reith) https://github.com/vim/vim/commit/dc4fa190e7b9d6ba49416ce875d2192c4444d3eb Omit Test_shape_final_to_medial(): removed in later patches.
* vim-patch:8.2.5044: command line test failszeertzjq2022-07-07
| | | | | | | Problem: Command line test fails. Solution: Also beep when cmdline win can't be opened because of locks. Make the test not beep. Make the test pass on MS-Windows. https://github.com/vim/vim/commit/be99042b03edf7b8156c9adbc23516bfcf2cec0f
* vim-patch:8.2.5043: can open a cmdline window from a substitute expressionzeertzjq2022-07-07
| | | | | | | Problem: Can open a cmdline window from a substitute expression. Solution: Disallow opening a command line window when text or buffer is locked. https://github.com/vim/vim/commit/71223e2db87c2bf3b09aecb46266b56cda26191d
* vim-patch:8.2.0614: get ml_get error when deleting a line in 'completefunc' ↵zeertzjq2022-07-07
| | | | | | | | | | | | | (#19244) Problem: Get ml_get error when deleting a line in 'completefunc'. (Yegappan Lakshmanan) Solution: Lock the text while evaluating 'completefunc'. https://github.com/vim/vim/commit/ff06f283e3e4b3ec43012dd3b83f8454c98f6639 Fix a mistake in the porting of patch 8.1.0098. Cherry-pick Test_run_excmd_with_text_locked() from patch 8.2.0270. Cherry-pick test_gf.vim changes from patch 8.2.0369. Cherry-pick message change from later patches.
* refactor: replace char_uDundar Goc2022-07-02
| | | | Work on https://github.com/neovim/neovim/issues/459
* 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
|