aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* fix(inccommand): ignore trailing commands only for *previewed* command #15732Justin M. Keyes2021-09-20
| | | | | | | | | | Since the `State` is global, other scripts are unexpectedly affected during the 'inccommand' preview. This commit introduces a new flag for `do_cmdline`, in order to ignore trailing '|'-separated commands only for the command invoking the preview. fix #8796, update #7494 Co-authored-by: itchyny <itchyny@hatena.ne.jp>
* backport: fix(windowing): positioning of relative floatsandrew-pa2021-09-16
| | | | | | Fix relative floating windows so that they open in the correct position relative to each other. Also make sure that their positions are correct immediately after creation without a redraw.
* backport: fix(window.c): win_close from other tabpage #15454notomo2021-09-16
| | | | Fix #15313
* backport: fix(autocmd.c): fix conditions in block_autocmds, unblock_autocmds ↵gmntroll2021-09-16
| | | | | | | #15372 Logic got swapped in 7574918dc7b823c4a22eeb4949acfb9381446eab. We didn't notice it since v:termresponse isn't really used yet. #6279
* backport: refactor(sign): include longer sign column optionSirisak Lueangsaksri2021-09-16
|
* backport: fix(sign): reset auto sign column with minimum in float win ↵Sirisak Lueangsaksri2021-09-16
| | | | minimal style
* backport: fix(decorations): crash when :bdelete (extmark_free_all) after ↵Björn Linse2021-09-16
| | | | | | clear_namespace fixes #15212
* backport: fix(:source): copy curbuf lines to memory before sourcing #15111Sean Dewar2021-09-15
| | | | | | | | | | It's possible for weirdness to happen if curbuf is modified while sourcing from it via :source (with no arguments). For example: - Deleting lines from or wiping curbuf can cause internal error E315 to be thrown from ml_get. - Changing the curbuf to another buffer while sourcing can cause lines from the new curbuf to then be sourced instead.
* backport: fix(:source, nvim_exec): handle Vimscript line continuations #14809Sean Dewar2021-09-15
| | | | | | | | | | | | Problem: Anonymous :source (no args) and nvim_exec() don't support Vimscript line continuations. Solution: Factor out the concat logic into concat_continued_line() and a CONCAT_CONTINUED_LINES macro for simple concatenations where lines are fetched individually. Closes #14807
* ci: skip "cancels stale events on channel close" #15278Justin M. Keyes2021-09-14
| | | | | - ref #14083 #15251 - also: docs: naming conventions
* feat(lua)!: register_keystroke_callback => on_keyJustin M. Keyes2021-09-14
| | | | | | | | | Analogous to nodejs's `on('data', …)` interface, here on_key is the "add listener" interface. ref 3ccdbc570d85 #12536 BREAKING_CHANGE: vim.register_keystroke_callback() is now an error.
* Rename stdin to stdin_modeGregory Anders2021-08-26
| | | | stdin is a macro in Windows builds.
* feat(job): add parameter to close stdinGregory Anders2021-08-26
| | | | | | | | | | | | | | | | Some programs behave differently when they detect that stdin is being piped. This can be problematic when these programs are used with the job control API where stdin is attached, but not typically used. It is possible to run the job using a PTY which circumvents this problem, but that includes a lot of overhead when simply closing the stdin pipe would suffice. To enable this behavior, add a new parameter to the jobstart options dict called "stdin" with two valid values: "pipe" (the default) implements the existing behavior of opening a channel for stdin and "null" which disconnects stdin (or, if you prefer, connects it to /dev/null). This is extensible so that other modes can be added in the future.
* ex_cmds: verify invalid command nameBjörn Linse2021-07-02
|
* Merge pull request #14864 from seandewar/get-config-zindexBjörn Linse2021-07-02
|\ | | | | fix(api/win_get_config): include z-index
| * fix(api/win_get_config): include z-indexSean Dewar2021-06-19
| |
* | Revert "tui: improve support for tmux, GNU Screen" (#14786)Érico Nogueira Rolim2021-06-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Revert "tui: improve support for tmux, GNU Screen" This reverts commit c266c2f36ea56220268d2b19364e28815e338c2f. This commit broke neovim under tmux, where it "types" the background string as input to the terminal. Fixing this with neovim as-is requires changing tmux keybindings or TERM settings, which has to be done by every single user, therefore a fix should happen on neovim's side. Fixes #14298 * tui: fix code lints.
* | vim-patch:8.2.1905: the wininfo list may contain stale entries (#14884)Daniel Steinberg2021-06-30
| | | | | | | | | | | | Problem: The wininfo list may contain stale entries. Solution: When closing a window remove any other entry where the window pointer is NULL. https://github.com/vim/vim/commit/4882d983397057ea91c584c5a54aaccf15016d18
* | vim-patch:8.2.3072: "zy" does not work well when "virtualedit' is "block"Jan Edmund Lazo2021-06-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: The "zy" command does not work well when 'virtualedit' is set to "block". (Johann Höchtl) Solution: Make endspaces zero. (Christian Brabandt, closes vim/vim#8468, closes vim/vim#8448) https://github.com/vim/vim/commit/7d7bcc6ba01454c1cbb1dcbf5f11c3a4051535d6 N/A patches for version.c: vim-patch:8.2.3075: xxd always reports an old version string Problem: Xxd always reports an old version string. (Åsmund Ervik) Solution: Update the version string with the last known change date. (Jürgen Weigert, closes vim/vim#8475) https://github.com/vim/vim/commit/80b2ba3e9602e09ab523e78946fbb26da311b68b
* | Merge pull request #14930 from clason/ts-ifdef-fixupBjörn Linse2021-06-29
|\ \ | | | | | | fixup(ts): put ts_query_cursor_set_match_limit behind feature guard
| * | fixup(ts): put ts_query_cursor_set_match_limit behind feature guardChristian Clason2021-06-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a fixup for #14915, which used the above-mentioned call to restore the behavior of the pre-release version of tree-sitter to that of 0.19.5. However, this function was introduced after 0.19.5, breaking distro builds that link against 0.19.5 instead of the tag specified in neovim's build script. Now the function should only be called when it is available _and_ needed. Once tree-sitter is bumped to 0.19.6 (when this is released), this guard can be removed again. Fixes #14923 (among others)
* | | Merge pull request #14779 from tjdevries/tjdevries/vim_opt_fixesTJ DeVries2021-06-29
|\ \ \ | | | | | | | | An assortment of various vim.opt fixups.
| * | | fix(vim.opt): #14708 Now lets you put duplicate values in wildmodeTJ DeVries2021-06-29
| |/ /
* | | Merge pull request #14335 from chentau/extmark_delbytesBjörn Linse2021-06-29
|\ \ \ | |/ / |/| | Extmarks: manually zero out `curbuf->deleted_bytes2` on substitute and join
| * | Manually zero out deleted_bytes2 when substituting and joining lineschentau2021-06-29
| | |
* | | Merge pull request #14915 from clason/ts-match-limitBjörn Linse2021-06-28
|\ \ \ | | | | | | | | fix(treesitter): set match limit for query cursors
| * | | fix(treesitter): set match limit for query cursorsChristian Clason2021-06-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upstream tree-sitter raised the number of pending matches for a query cursor from 32 to 64k in <https://github.com/tree-sitter/tree-sitter/commit/ 78010722a49ed6224c773c22b0d25a8c9fbde584>, which severely impacted performance for some highlighting queries. This uses the `ts_query_cursor_set_match_limit` function introduced in <https://github.com/tree-sitter/tree-sitter/commit/ cd96552448a6e0d4eb27fc54b27cb5130c4b6f76> to manually set this back to the old default of 32. Fixes #14897
* | | | [RDY] Add buffer information to tabline_update (#12481)John Gehrig2021-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add buffer information to tabline_update Most terminal implementations of the tabline display buffer and tab information. Many neovim-qt users disable GuiTabline because it lacks functionality provided in the terminal implementation. The tabline_update event should include buffer information too, so client GUIs can display rich useful tabs.
* | | | vim-patch:8.2.2954: short file name extension for Scala not recognizedJan Edmund Lazo2021-06-26
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Short file name extension for Scala not recognized. Solution: Recognize *.sc. (closes vim/vim#8337) https://github.com/vim/vim/commit/6db7b6375a3ea3afef5295b1366896902012e640
* | | | vim-patch:8.2.3049: JSON patch file not recognizedJan Edmund Lazo2021-06-26
| | | | | | | | | | | | | | | | | | | | | | | | Problem: JSON patch file not recognized. Solution: Recognize json-patch as json. (Kevin Locke, closes vim/vim#8450) https://github.com/vim/vim/commit/6582e230a0f6592287b1123c5fc3807d6fed997e
* | | | vim-patch:8.2.3050: cannot recognize elixir filesJan Edmund Lazo2021-06-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Cannot recognize elixir files. Solution: Recognize Elixir-specific files. Check if an .ex file is Euphoria or Elixir. (Austin Gatlin, closes vim/vim#8401, closes vim/vim#8446) https://github.com/vim/vim/commit/f3caeb63d62c08b579e9b5f40b35e8bf64dde87a
* | | | vim-patch:8.2.3018: 'quickfixtextfunc' formatting is lost when switching ↵Yorick Peterse2021-06-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | buffers (#14865) Problem: Formatting using quickfixtextfunc is lost when updating location lists for different buffers. (Yorick Peterse) Solution: Use the right window for the locaiton list. (Yegappan Lakshmanan, closes vim/vim#8400, closes vim/vim#8403) https://github.com/vim/vim/commit/ad52f96a2d3169cb1b915c1d4a6ba26ba6e5bd0a
* | | | vim-patch:8.1.0897: can modify a:000 when using a reference (#14902)Jan Edmund Lazo2021-06-26
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Can modify a:000 when using a reference. Solution: Make check for locked variable stricter. (Ozaki Kiichi, closes vim/vim#3930) https://github.com/vim/vim/commit/05c00c038bc16e862e17f9e5c8d5a72af6cf7788
* | | | Fix `<afile>` getting prepended with a slash on WinClosed (#14515)Ghjuvan Lacambre2021-06-26
|/ / / | | | | | | | | | | | | | | | It is wrong to assume that you can't shorten a path if it's in `/`: you can always shorten it by removing the forward slash. Closes #14512
* | | vim-patch:8.2.3033: no error when using alpha delimiter with :globalJan Edmund Lazo2021-06-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: No error when using alpha delimiter with :global. Solution: Check the delimiter like with :substitute. (closes vim/vim#8415) https://github.com/vim/vim/commit/419a40ac9657e39646b2e0f3f71d7736b0c459d1 N/A patches for version.c: vim-patch:8.1.2391: cannot build when __QNXNTO__ is defined Problem: Cannot build when __QNXNTO__ is defined. (Ian Wayne Larson) Solution: Move the check for "qansi". (Ken Takata, closes vim/vim#5317) https://github.com/vim/vim/commit/c95e8d649045add4e77b423bc159dc0d845af559 vim-patch:8.2.2294: VMS: a few remaining problems Problem: VMS: a few remaining problems. Solution: Add VMS specific changes. Add Lua support. (Zoltan Arpadffy) https://github.com/vim/vim/commit/82c38fe508155c11a904e6111b5bfb6adde3fb9a vim-patch:8.2.3034: installing packages on github CI sometimes fails Problem: Installing packages on github CI sometimes fails. Solution: Update package information first. (Christian Brabandt, closes vim/vim#8432) https://github.com/vim/vim/commit/ef7be8348fd830e409504a442f3f3ad0931cfbc3 vim-patch:8.2.3037: configure reports libcanberra when checking for libsodium Problem: Configure reports libcanberra when checking for libsodium. Solution: Adjust the message. (Ozaki Kiichi, closes vim/vim#8435) https://github.com/vim/vim/commit/8ce3ca8961c5968a02de0a0b98f906695331f254 vim-patch:8.2.3038: Amiga built-in version string doesn't include build date Problem: Amiga built-in version string doesn't include build date. Solution: Add the build date if available. (Ola Söder, closes vim/vim#8437) https://github.com/vim/vim/commit/cc6504098605f894b557109b618e88913a89914b vim-patch:8.2.3043: Amiga: cannot get the shell size on MorphOS and AROS Problem: Amiga: cannot get the shell size on MorphOS and AROS. Solution: Use control sequences. (Ola Söder, closes vim/vim#8438) https://github.com/vim/vim/commit/d415d269130b233c0f198c75cc159bee721aa55c
* | | vim-patch:8.2.2185: BufUnload is not triggered for the quickfix dummy bufferJan Edmund Lazo2021-06-23
| | | | | | | | | | | | | | | | | | | | | Problem: BufUnload is not triggered for the quickfix dummy buffer. Solution: Do trigger BufUnload. (Pontus Leitzler,closes vim/vim#7518, closes vim/vim#7517) Fix white space around "=". https://github.com/vim/vim/commit/1cfb9bb5c06c07f14475f39c4eb57fea1f0dfb69
* | | vim-patch:8.2.1255: cannot use a lambda with quickfix functionsJan Edmund Lazo2021-06-23
| | | | | | | | | | | | | | | | | | Problem: Cannot use a lambda with quickfix functions. Solution: Add support for lambda. (Yegappan Lakshmanan, closes vim/vim#6499) https://github.com/vim/vim/commit/d43906d2e5969288f239df851f5ad7b1dc2c7251
* | | vim-patch:8.1.1437: code to handle callbacks is duplicatedJan Edmund Lazo2021-06-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Code to handle callbacks is duplicated. Solution: Add callback_T and functions to deal with it. https://github.com/vim/vim/commit/3a97bb3f0f8bd118ae23f1c97e55d84ff42eef20 Port Vim's put_callback() as callback_put() because Neovim's naming convention is {type}_{action}, not {action}_{type}. Renaming put_callback type as PutCallback. https://neovim.io/develop/style-guide.xml#Type_Names
* | | Merge pull request #14868 from shadmansaleh/patch_verbose_for_luaBjörn Linse2021-06-23
|\ \ \ | | | | | | | | fix(runtime): Fix bugs regarding lua runtime files
| * | | fix(source): Source giving E484 & parsing error at line 1 for lua filesshadmansaleh2021-06-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's happening because do_source is only expected to return FAIL when it was unable to open file . But `nlua_exec_file` returns fail for parsing and execution error too . Those errors are emitted through `nlua_error`. So now return value of nlua_exec_file is ignored like do_cmdline. It now only returns fail when it was unable to open file that check is done before calling nlua_exec_file or do_cmdline. Errors in nlua_exec_file are still directly emitted through nlua_error like before.
| * | | BugFix: Fix inconsistent verbose messageshadmansaleh2021-06-21
| | |/ | |/| | | | | | | | | | | | | | | | When a keymap is set from lua currently verbose message says it's set from line 1. That's incorrect because we don't really know when it was set. So until proper :verbose support isn't added for sourceing lua it shouldn't say where it was set at.
* | | extmark: fix deletable nodes in MarkTree sometimes getting skippedsnezhniylis2021-06-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per #14236, performing extmark cleanup in a certain namespace does not guarantee removing all the extmarks inside given namespace. The issue resides within the tree node removal method and results in a couple of rare edge cases. To demonstrate what causes this bug, I'll give an example covering one of the edge cases. === AN EXAMPLE === (A) (B) (C) (D) (E) --------- --------- --------- --------- --------- <0, 1> <0, 1> <0, 1> <0, 1> <0, 1> <0, 2> <0, 2> <0, 2> <0, 2> <0, 2> <0, 3> <0, 3> <0, 3> <0, 3> <0, 3> <0, 4> <0, 4> <0, 4> <0, 4> <0, 4> <0, 5> <0, 5> <0, 5> <0, 5> <0, 5> <0, 6> <0, 6> <0, 6> <0, 6> <0, 6> <0, 7> <0, 7> <0, 7> <0, 7> <0, 7> <0, 8> <0, 8> <0, 8> <0, 8> <0, 8> <0, 9> <0, 9> * * <0, 9> * <0, 9> [0, 10] * [0, 10] <0, 9> [0, 11] [0, 11] [0, 11] [0, 11] [0, 11] [0, 12] [0, 12] * [0, 12] [0, 12] [0, 12] [0, 13] [0, 13] [0, 13] [0, 13] [0, 13] [0, 14] [0, 14] [0, 14] [0, 14] [0, 14] [0, 15] [0, 15] [0, 15] [0, 15] [0, 15] [0, 16] [0, 16] [0, 16] [0, 16] [0, 16] [0, 17] [0, 17] [0, 17] [0, 17] [0, 17] [0, 18] [0, 18] [0, 18] [0, 18] [0, 18] [0, 19] [0, 19] [0, 19] [0, 19] [0, 19] [0, 20] [0, 20] [0, 20] [0, 20] [0, 20] DIAGRAM EXPLANATION * Every column is a state of the marktree at a certain stage. * To make it simple, I don't draw the whole tree. What you see are 2 leftmost parent nodes ([0, 10], [0, 20]) and their children placed in order `MarkTreeIter` would iterate through. From top to bottom. * Numbers on this diagram represent extmark coordinates. Relative positioning and actual mark IDs used by the marktree are avoided for simplicity. * 2 types of brackets around coordinates represent 2 different extmark namespaces (`ns_id`s). * '*' shows iterator position. ACTUAL EXPLANATION Let's assume, we have two sets of extmarks from 2 different plugins: * Plugin1: <0, 1-9> * Plugin2: [0, 10-20] 1. Plugin2 calls `vim.api.nvim_buf_clear_namespace(buf_handle, ns_id, 0, -1)` to clear all its extmarks which results in `extmark_clear` call. 2. The iteration process goes on ignoring extmarks with irrelevant `ns_id` from Plugin1, until it reaches [0, 10], entering state (A). 3. At the end of cleaning up process, `marktree_del_itr` gets called. This function is supposed to remove given node and, if necessary, restructure the tree. Also, move the iterator to the next node. The bug occurs in this function. 4. The iterator goes backwards to the node's last child, to put it in the place of its deleted parent later. (B) 5. The parent node is deleted and replaced with its child node. (C) 6. Since now this node has 8 children, which is less than `MT_BRANCH_FACTOR - 1`, it get's merged with the next node. (D) 7. Finally, since at (B) the iterator went backward, it goes forward twice, skipping [0, 11] node, causing this extmark to persist, causing the bug. (E) ANALYSIS AND SOLUTION The algorithm works perfectly when the parent node gets replaced by its child, but no merging occurs. I.e. the exact same diagram, but without the (D) stage. If not for (D), it would iterate to <0, 9> and then to [0, 11]. So, iterating twice makes sense. The actual problem is in (C) stage, because the iterator index isn't adjusted and still pointing to no longer existent node. So my solution is to adjust iterator index after removing the child node. More info: https://github.com/neovim/neovim/pull/14719
* | | vim-patch:8.2.3020: unreachable code (#14866)jimman20032021-06-20
|/ / | | | | | | | | Problem: Unreachable code. Solution: Remove the code. (closes vim/vim#8406) https://github.com/vim/vim/commit/2fb749568662c86992aea3b596458b9e470f223d
* | Merge pull request #14824 from vigoux/extmarks-ts-perfBjörn Linse2021-06-18
|\ \ | | | | | | perf(extmarks): allow ephemeral extmarks past EOF to remove O(strlen^2) cost of tree-sitter
| * | perf(extmarks): allow ephemeral extmarks past EOFThomas Vigouroux2021-06-16
| | |
* | | vim-patch:8.2.3012: when 'rightleft' is set the line number is drawn ↵Jan Edmund Lazo2021-06-17
|/ / | | | | | | | | | | | | | | | | reversed (#14839) Problem: When 'rightleft' is set the line number is sometimes drawn reversed. Solution: Adjust how space is handled. (Christian Brabandt, closes vim/vim#8389, closes vim/vim#8391) https://github.com/vim/vim/commit/29f0dc3689eafcf7888e06d57d1cf79e62c5c148
* | Merge pull request #14454 from eltociear/patch-1Thomas Vigouroux2021-06-15
|\ \ | | | | | | screen: fix typo in screen.c
| * | screen: fix typo in screen.cIkko Ashimine2021-04-29
| | | | | | | | | accomodate -> accommodate
* | | option: fix typo in option.cIkko Ashimine2021-06-16
| | | | | | | | | seperated -> separated
* | | Merge pull request #14804 from clason/rounded-bordersMichael Lingelbach2021-06-14
|\ \ \ | | | | | | | | [RDY] feat(float): add rounded borders preset