aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* 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
| * | feat(float): add rounded borders presetChristian Clason2021-06-14
| | | | | | | | | | | | | | | | | | | | | | | | Add `borders = "rounded"` preset for `nvim_open_win`, equivalent to border = {"╭", "─", "╮", "│", "╯", "─", "╰", "│"} Also add undocumented "solid" preset to docs.
* | | vim-patch:8.2.2990: Jupyter Notebook files are not recognizedJan Edmund Lazo2021-06-13
| | | | | | | | | | | | | | | | | | Problem: Jupyter Notebook files are not recognized. Solution: Recognize *.ipynb. (closes vim/vim#8375) https://github.com/vim/vim/commit/2e66b0d1373891f40e2561ccd2d3369de1614bcd
* | | vim-patch:8.2.0936: some terminals misinterpret the code for getting cursor ↵Jan Edmund Lazo2021-06-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | style Problem: Some terminals misinterpret the code for getting cursor style. Solution: Send a sequence to the terminal and check the result. (IWAMOTO Kouichi, closes vim/vim#2126) Merged with current code. https://github.com/vim/vim/commit/a45551a53557dba98973fdb3ff737dea2fffcda3 Cherry-pick Test_cwindow_highlight() from patch v8.1.2040 because it is skipped.
* | | vim-patch:8.2.1354: test 59 is old styleJan Edmund Lazo2021-06-13
|/ / | | | | | | | | | | Problem: Test 59 is old style. Solution: Convert into a new style test. (Yegappan Lakshmanan, closes vim/vim#6604) https://github.com/vim/vim/commit/aa970abd0a987de96321d33db82f70bbceac931b
* | Merge pull request #14788 from shadmansaleh/fix/lua_runtime1Björn Linse2021-06-13
|\ \ | | | | | | fixup(runtime): Fix lua runtime files not listed in :scriptnames
| * | refactor(startup): Load init.lua with do_sorceshadmansaleh2021-06-13
| | | | | | | | | | | | This was init.lua will be logged in startuptime
| * | fixup(runtime): Fix lua runtime files not listedshadmansaleh2021-06-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | lua runtime files weren't listed in :scriptname & profiler. This fixes that. * Add tests * Small doc tweeks
* | | vim-patch:8.2.2896: spellfile functionality not fully testedJan Edmund Lazo2021-06-12
| | | | | | | | | | | | | | | | | | | | | Problem: Spellfile functionality not fully tested. Solution: Add tests for CHECKCOMPOUNDPATTERN and COMMON. (Dominique Pellé, closes vim/vim#8270) https://github.com/vim/vim/commit/dc3275a1ac73b6c4d0c9d2e238ea80b477705b6f
* | | vim-patch:8.2.0945: cannot use "z=" when 'spell' is offJan Edmund Lazo2021-06-12
| | | | | | | | | | | | | | | | | | | | | Problem: Cannot use "z=" when 'spell' is off. Solution: Make "z=" work even when 'spell' is off. (Christian Brabandt, Gary Johnson, closes vim/vim#6227) https://github.com/vim/vim/commit/152e79e94bb935e75b866bd55479648cde11066a
* | | vim-patch:8.2.0046: tests for spell suggestions are slowJan Edmund Lazo2021-06-12
| | | | | | | | | | | | | | | | | | | | | Problem: Tests for spell suggestions are slow. Solution: Use shorter words. Test with latin1 and utf-8 to cover more code. (Dominique Pelle, closes vim/vim#5399) https://github.com/vim/vim/commit/767340574b5a0c697e650b3bbc3a4af10e51cb89
* | | vim-patch:8.2.0039: memory access error when "z=" has no suggestionsJan Edmund Lazo2021-06-12
| | | | | | | | | | | | | | | | | | Problem: Memory access error when "z=" has no suggestions. Solution: Check for negative index. https://github.com/vim/vim/commit/569fea2c312126dd5a542c4b1aa51095136a2c0d
* | | vim-patch:8.2.0038: spell suggestions insufficiently testedJan Edmund Lazo2021-06-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Spell suggestions insufficiently tested. Solution: Add spell suggestion tests. (Dominique Pelle, closes vim/vim#5398) https://github.com/vim/vim/commit/e9a8d1f9adaf4599b5a7923f8db8e207ed6e7eca Requires latest en.utf-8.spl from https://ftp.nluug.nl/pub/vim/runtime/spell/. Include the following patch because patch v8.2.0946 was merged: vim-patch:8.2.0948: spell test fails Problem: Spell test fails. Solution: Adjust expected text of the prompt. https://github.com/vim/vim/commit/d281b7c227bc4c78813fdc297ccee4b2cad7e605
* | | vim-patch:8.1.1865: spellrare and spellrepall in the wrong orderJan Edmund Lazo2021-06-12
| | | | | | | | | | | | | | | | | | Problem: Spellrare and spellrepall in the wrong order. Solution: Put spellrare below spellrepall. (closes vim/vim#4820) https://github.com/vim/vim/commit/a3891681f72fd9efdea6444620d787358850d823
* | | vim-patch:8.1.1838: there is :spellwrong and :spellgood but not :spellrareJan Edmund Lazo2021-06-12
|/ / | | | | | | | | | | Problem: There is :spellwrong and :spellgood but not :spellrare. Solution: Add :spellrare. (Martin Tournoij, closes vim/vim#4291) https://github.com/vim/vim/commit/08cc374dabd2a02785129fa1c0100f7745c244ad
* | fix(ui): Fix pum incorrect position in multigrid modeSerg Tereshchenko2021-06-12
| | | | | | | | Refs #12985
* | Merge pull request #14761 from janlazo/vim-8.2.2966Jan Edmund Lazo2021-06-11
|\ \ | | | | | | vim-patch:8.2.{1702,2422,2966,2971,2974}
| * | vim-patch:8.2.2974: Greek spell checking uses wrong case foldingJan Edmund Lazo2021-06-11
| | | | | | | | | | | | | | | | | | | | | Problem: Greek spell checking uses wrong case folding. Solution: Fold capital sigma depending on whether it is at the end of a word or not. (closes vim/vim#299) https://github.com/vim/vim/commit/4f135275984722c1b1e9ace72eeeb7ce7e4ec983
| * | vim-patch:8.2.2971: cannot yank a block without trailing spacesJan Edmund Lazo2021-06-10
| | | | | | | | | | | | | | | | | | Problem: Cannot yank a block without trailing spaces. Solution: Add the "zy" command. (Christian Brabandt, closes vim/vim#8292) https://github.com/vim/vim/commit/544a38e44db0f25ec4fa7a2a4666cf28a2336f33
| * | vim-patch:8.2.2422: crash when deleting with line number out of rangeJan Edmund Lazo2021-06-10
| | | | | | | | | | | | | | | | | | Problem: Crash when deleting with line number out of range. (Houyunsong) Solution: Avoid using a negative line number. https://github.com/vim/vim/commit/1d859e24218635c57c09801840ff159cb845ae6a
| * | vim-patch:8.2.1702: crash when using undo after deleting folded linesJan Edmund Lazo2021-06-10
| | | | | | | | | | | | | | | | | | Problem: Crash when using undo after deleting folded lines. Solution: Check for NULL pointer. (closes vim/vim#6968) https://github.com/vim/vim/commit/da697645d5917eb3d4168c06c3442bef9fb746bf
| * | vim-patch:8.2.2966: ml_get errors after recovering a fileJan Edmund Lazo2021-06-10
| | | | | | | | | | | | | | | | | | Problem: ml_get errors after recovering a file. (Yegappan Lakshmanan) Solution: Fix the cursor position after deleting lines. https://github.com/vim/vim/commit/e3f50ad640fb30f27027f85a616280288bbc14ca
* | | Merge pull request #14773 from mjlbach/fix/vim-region-boundsMichael Lingelbach2021-06-11
|\ \ \ | | | | | | | | fix(lua): ensure vim.region truncates to buf range
| * | | fix(lua): ensure vim.region truncates to buf rangeMichael Lingelbach2021-06-11
| |/ / | | | | | | | | | | | | | | | | | | | | | If vim.region receives a large range outside of the current buffer bounds, it will not check the range ahead of time and loop until neovim exhausts the system memory. Fixes #14743
* | | Merge pull request #14686 from shadmansaleh/feat/evaluate_plugin/luaBjörn Linse2021-06-11
|\ \ \ | | | | | | | | runtime: allow to use .lua files for most features defined as &rtp/{feature}/*.vim
| * | | refactor(source): Move lua file detection to do_sourceshadmansaleh2021-06-11
| | | | | | | | | | | | | | | | | | | | | | | | So now :source can run lua files too :) * feat: Add support for :[ranged]source for lua files
| * | | enhance(runtime): Enable completion for lua filesshadmansaleh2021-06-11
| | | | | | | | | | | | | | | | Enabled for `:colorscheme` `:compiler` filetype
| * | | feat(runtime): Allow lua to be used in ftdetectshadmansaleh2021-06-11
| | | |
| * | | feat(runtime): Allow lua to be used in compilershadmansaleh2021-06-11
| | | |
| * | | feat(runtime): Allow lua to be used in colorschemesshadmansaleh2021-06-11
| | | | | | | | | | | | | | | | * tests(runtime): move runtime/plugin tests to functional/lua/runtime_spec
| * | | feat(startup): Source runtime/plugin/**/*.lua at startupshadmansaleh2021-06-11
| |/ / | | | | | | | | | | | | | | | For opt plugins these files are sourced on `:packadd` * `:runtime` Now can exexute lua files
* / / macros: add a dummy statement to allow FALLTHROUGH in an empty case.Björn Linse2021-06-11
|/ /
* | api:get_config: don't add border="none" (inactive default)Björn Linse2021-06-10
| |
* | fix linter errorsCorey Williamson2021-06-10
| |
* | api: include border in nvim_win_get_configCorey Williamson2021-06-10
| |
* | Merge pull request #14717 from notomo/add-win-call-apiBjörn Linse2021-06-10
|\ \ | | | | | | api: add nvim_win_call
| * | api: add nvim_win_callnotomo2021-06-10
| | |