aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
| | * | fix(screen): redraw the ruler for a current floating windowbfredl2023-03-14
| | |/ | | | | | | | | | | | | | | | | | | Semi-regression. The "ruler" behavior for a floating window was never really specified but in practice followed the users cursor movements in normal mode in a focused float, which seems like a reasonable behavior to now specify.
| * / test: re-bundle cat on windows (#21255)dundargoc2023-03-14
| |/ | | | | | | | | | | | | | | | | | | The builtin cat was removed in 4bc9229ecbec514e9a87cfc4be88ea27a971e9a1 as it is not used during runtime but only for tests. However, it is a very small and useful utility program that we need for a lot of our tests, so there's no harm in bundling it, and it helps us avoid complicating our build system by having two versions of neovim (neovim for users and neovim for testing). Also skip tests if "grep" or "sleep" isn't available.
| * feat(options)!: deprecate paste, remove pastetoggle (#22647)ii142023-03-13
| | | | | | | | | | we cannot remove 'paste'. It is very common in plugins and configs. 'pastetoggle' can and should be removed though, it's a total waste of everyone's time because it generates bug reports and doesn't work well, and is useless because bracketed-paste works better.
| * refactor!: rename vim.pretty_print => vim.printJustin M. Keyes2023-03-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: The function name `vim.pretty_print`: 1. is verbose, which partially defeats its purpose as sugar 2. does not draw from existing precedent or any sort of convention (except external projects like penlight or python?), which reduces discoverability, and degrades signaling about best practices. Solution: - Rename to `vim.print`. - Change the behavior so that 1. strings are printed without quotes 2. each arg is printed on its own line 3. tables are indented with 2 instead of 4 spaces - Example: :lua ='a', 'b', 42, {a=3} a b 42 { a = 3 } Comparison of alternatives: - `vim.print`: - pro: consistent with Lua's `print()` - pro: aligns with potential `nvim_print` API function which will replace nvim_echo, nvim_notify, etc. - con: behaves differently than Lua's `print()`, slightly misleading? - `vim.echo`: - pro: `:echo` has similar "pretty print" behavior. - con: inconsistent with Lua idioms. - `vim.p`: - pro: very short, fits with `vim.o`, etc. - con: not as discoverable as "echo" - con: less opportunity for `local p = vim.p` because of potential shadowing.
| * feat(ui): add scroll_delta to win_viewport event #19270Matthias Deiml2023-03-12
| | | | | | | | | | | | | | | | | | | | scroll_delta contains how much the top line of a window moved since the last time win_viewport was emitted. It is expected to be used to implement smooth scrolling. For this purpose it only counts "virtual" or "displayed" so folds should count as one line. Because of this it adds extra information that cannot be computed from the topline parameter. Fixes #19227
| * refactor(redraw): make cursor position redraw use the "redraw later" patternbfredl2023-03-12
| |
| * test: use a wider screen in the rightleft winhl test (#22641)zeertzjq2023-03-12
| | | | | | With a wide screen this actually previously caused an overflow.
| * fix(screen): correctly draw background and eob with 'rightleft' (#22640)zeertzjq2023-03-12
| |
| * fix(sleep): correct cursor placement (#22639)zeertzjq2023-03-12
| | | | | | Just setcursor_mayforce(true) is enough as Nvim uses msg_grid.
| * vim-patch:9.0.1401: condition is always true (#22638)zeertzjq2023-03-12
| | | | | | | | | | | | Problem: Condition is always true. Solution: Remove the condition. (closes vim/vim#12139) https://github.com/vim/vim/commit/c481ad38f05c9f759ca7fd01a54c78acad794e85
| * vim-patch:8.2.1398: autoload script sourced twice if sourced directly (#22622)zeertzjq2023-03-11
| | | | | | | | | | | | | | | | | | | | | | Problem: Autoload script sourced twice if sourced directly. Solution: Do not source an autoload script again. (issue vim/vim#6644) https://github.com/vim/vim/commit/daa2f36573db3e1df7eb1fdbc3a09a2815644048 Cherry-pick ret_sid changes from patch 8.2.0149. Use do_in_runtimepath() as that's what source_runtime() calls in Nvim. Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * fix(api): set script context when setting usercmd or option (#22624)zeertzjq2023-03-11
| |
| * fix(edit): don't subtract msg_scrolled when removing double quote (#22630)zeertzjq2023-03-11
| | | | | | With msg_grid there is no need to subtract msg_scrolled.
| * Merge pull request #22625 from tomtomjhj/diff-on_bytes-oncebfredl2023-03-11
| |\ | | | | | | fix(diff): trigger on_bytes only once after diffget/diffput
| | * fix(diff): trigger on_bytes only once after diffget/diffputJaehwang Jung2023-03-11
| | | | | | | | | | | | | | | | | | | | | Problem: The fix from b50ee4a8dc4306e4be78ac33fb74b21dc6be5538 may adjust extmark twice, triggering on_bytes callback twice. Solution: Don't let mark_adjust adjust extmark.
| * | refactor: move ga_loaded to runtime.c (#22626)zeertzjq2023-03-11
| |/
| * refactor(runtime.c): factor out find_script_by_name() (#22620)zeertzjq2023-03-11
| | | | | | This the refactoring done in Vim patch 8.2.4050.
| * vim-patch:9.0.0244: cannot easily get the list of sourced scripts (#22596)Michal Liszcz2023-03-11
| | | | | | | | | | | | | | | | | | | | | | Problem: Cannot easily get the list of sourced scripts. Solution: Add the getscriptinfo() function. (Yegappan Lakshmanan, closes vim/vim#10957) https://github.com/vim/vim/commit/f768c3d19c518822d89dec4cc3947ddeea249316 Cherry-pick usr_41.txt change from a later runtime update. Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
| * vim-patch:9.0.1397: highlight for popupmenu kind and extra cannot be set ↵zeertzjq2023-03-11
| | | | | | | | | | | | | | | | | | | | | | (#22619) Problem: Highlight for popupmenu kind and extra cannot be set. Solution: Add PmenuKind, PmenuKindSel, PmenuExtra and PmenuExtraSel highlight groups and use them. (Gianmaria Bajo, closes vim/vim#12114) https://github.com/vim/vim/commit/6a7c7749204b256e779c245b1e999bf852ad7b64 Co-authored-by: Gianmaria Bajo <mg1979.git@gmail.com>
| * build: explicitly add dependency include dir for header generationdundargoc2023-03-10
| | | | | | | | | | | | | | | | | | | | | | Neovim and the generated headers needs to use the same include directories to build correctly. However, we need to generate headers before all target dependencies has been resolved, meaning that we cannot rely on any target to determine the final list of include directories. This may lead to a problems when bundling some, but not all or none, dependencies as the dependency include directory won't be included. Also remove the dependency path options as this assumes a specific structure on the dependency build directory.
| * perf(treesitter): more efficient foldexprLewis Russell2023-03-10
| |
| * fix(treesitter): correct include_bytes arg for parse()Lewis Russell2023-03-10
| |
| * refactor(treesitter): use byte ranges from treesitter (#22589)Lewis Russell2023-03-09
| |
| * feat: try to recover from missing tempdir #22573Justin M. Keyes2023-03-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: If vim_tempdir mysteriously goes missing (typically by "antivirus" on Windows), any plugins using tempname() will be broken for the rest of the session. #1432 #9833 https://groups.google.com/g/vim_use/c/ef55jNm5czI Steps: mkdir foo TMPDIR=./foo nvim :echo tempname() !rm -r foo :echo tempname() tempname() still uses the foo path even though it was deleted. Solution: - Don't assume that vim_tempdir exists. - If it goes missing once, retry vim_mktempdir and log (silently) an error. - If it goes missing again, retry vim_mktempdir and show an error. Rejected in Vim for performance reasons: https://groups.google.com/g/vim_use/c/qgRob9SWDv8/m/FAOFVVcDTv0J https://groups.google.com/g/vim_dev/c/cogp-Vye4oo/m/d_SVFXBbnnoJ But, logging shows that `vim_gettempdir` is not called frequently. Fixes #1432 Fixes #9833 Fixes #11250 Related: stdpath("run") f50135a32e11c535e1dc3a8e9460c5b4e640ee86
| * Merge pull request #22547 from luukvbaal/statuslinebfredl2023-03-09
| |\ | | | | | | perf(statusline): UI elements are always redrawn on K_EVENT
| | * perf(statusline): UI elements are always redrawn on K_EVENTLuuk van Baal2023-03-08
| | | | | | | | | | | | | | | Problem: 'statusline'-format UI elements are redrawn on each K_EVENT. Solution: Only redraw UI elements when something relevant has changed.
| * | vim-patch:8.2.1067: expression "!expr->func()" does not work (#22585)zeertzjq2023-03-09
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Expression "!expr->func()" does not work. Solution: Apply plus and minus earlier. (closes vim/vim#6348) https://github.com/vim/vim/commit/0b1cd52ff6bf690388f892be686a91721a082e55 Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * | fix(buffer_updates): save and restore current window cursor (#16732)zeertzjq2023-03-09
| | | | | | | | | | | | | | | | | | | | | | | | When a buffer update callback is called, textlock is active so buffer text cannot be changed, but cursor can still be moved. This can cause problems when the buffer update is in the middle of an operator, like the one mentioned in #16729. The solution is to save cursor position and restore it afterwards, like how cursor is saved and restored when evaluating an <expr> mapping.
| * | vim-patch:9.0.1392: using NULL pointer with nested :open command (#22583)zeertzjq2023-03-09
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Using NULL pointer with nested :open command. Solution: Check that ccline.cmdbuff is not NULL. https://github.com/vim/vim/commit/7ac5023a5f1a37baafbe1043645f97ba3443d9f6 Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * | Revert "refactor(treesitter): delegate region calculation to treesitter" ↵Lewis Russell2023-03-08
| | | | | | | | | | | | | | | | | | | | | (#22575) Revert "refactor(treesitter): delegate region calculation to treesitter (#22553)" This reverts commit 276b647fdba07bf1762d8dd371c4b655b8a418df.
| * | refactor(treesitter): delegate region calculation to treesitter (#22553)Lewis Russell2023-03-08
| |/
| * Merge pull request #22558 from zeertzjq/vim-8.2.3969zeertzjq2023-03-07
| |\
| | * vim-patch:8.2.3969: value of MAXCOL not available in Vim scriptzeertzjq2023-03-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Value of MAXCOL not available in Vim script. Solution: Add v:maxcol. (Naohiro Ono, closes vim/vim#9451) https://github.com/vim/vim/commit/56200eed62e59ad831f6564dcafe346e6f97ac20 The variable is always 2147483647, but introducing it makes functions easier to document. Co-authored-by: naohiro ono <obcat@icloud.com>
| * | build!: make libintl a required dependencydundargoc2023-03-07
| |/ | | | | | | Libintl being an optional dependency is not by design, but a workaround as it didn't use work on all platforms. That should be fixed by now.
| * test: move oldtests to test directory (#22536)dundargoc2023-03-07
| | | | | | | | | | The new oldtest directory is in test/old/testdir. The reason for this is that many tests have hardcoded the parent directory name to be 'testdir'.
| * fix(column): issues with 'statuscolumn' width (#22542)luukvbaal2023-03-07
| | | | | | | | | | | | | | | | Problem: 'statuscolumn' width can be incorrect when toggling 'number' or setting 'statuscolumn'. Solution: Make sure the width is reset and re-estimated when 'statuscolumn' and 'number' are set. (When 'relativenumber' is set this already happens because it always changes "nrwidth_line_count".)
| * Merge pull request #13834 from bfredl/omniluabfredl2023-03-07
| |\ | | | | | | omnifunc for builtin lua
| | * feat(lua): omnifunc for builting lua interpreterBjörn Linse2023-03-06
| | | | | | | | | | | | | | | | | | | | | also make implicit submodules "uri" and "_inspector" work with completion this is needed for `:lua=vim.uri_<tab>` wildmenu completion to work even before uri or _inspector functions are used.
| * | build: enable unit testing on release builds (#22554)dundargoc2023-03-06
| | | | | | | | | | | | | | | | | | | | | Unittests not working on release builds can lead to confusing situations, such as contributors wondering why their tests aren't working if they forgot they've built with a release build. This only increased the Release executable size by 8 kB on my personal machine, which is an acceptable tradeoff.
| * | feat(lsp)!: add rule-based sem token highlighting (#22022)swarn2023-03-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | feat(lsp)!: change semantic token highlighting Change the default highlights used, and add more highlights per token. Add an LspTokenUpdate event and a highlight_token function. :Inspect now shows any highlights applied by token highlighting rules, default or user-defined. BREAKING CHANGE: change the default highlight groups used by semantic token highlighting.
| * | fix(diff): add NULL checkLewis Russell2023-03-06
| | |
| * | feat(lua): add semver apiKelly Lin2023-03-06
| | |
| * | vim-patch:9.0.1386: options test fails with some window width (#22548)zeertzjq2023-03-06
| | | | | | | | | | | | | | | | | | Problem: Options test fails with some window width. Solution: Adjust what text the test checks with. (closes vim/vim#12111) https://github.com/vim/vim/commit/30585e03a7ce6cf985f93ca30275bf4dae0d87cc
| * | vim-patch:9.0.1385: g'Esc is considered an error (#22544)zeertzjq2023-03-06
| | | | | | | | | | | | | | | | | | Problem: g'Esc is considered an error. Solution: Make g'Esc silently abandon the command. (closes vim/vim#12110) https://github.com/vim/vim/commit/f86dea8119f3141e3d2c680219036d1511101f9b
| * | build: remove workaround for incorrectly packaged libluvdundargoc2023-03-05
| | | | | | | | | | | | | | | | | | This removes a workaround for incorrectly packaged libluv in 90e44ecf1144cb32195da00e24d23afb111ea680 as it should not be needed anymore.
| * | build: fix unknown pragma warning with mingw (#22533)Biswapriyo Nath2023-03-05
| | | | | | | | | | | | | | | | | | | | | | | | This checks MSVC toolchain with _MSC_VER macro before adding pragma warning directive. It is specific to MSVC and shows compiler warning with mingw gcc as following: main.c:187: warning: ignoring '#pragma warning ' [-Wunknown-pragmas] 187 | # pragma warning(suppress : 4996)
| * | vim-patch:9.0.0870: get E967 when using text property in quickfix windowzeertzjq2023-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Get E967 when using text property in quickfix window. (Sergey Vlasov) Solution: Do not add an extra NUL and compute the text length correctly. (closes vim/vim#11513) https://github.com/vim/vim/commit/2f7bfe66a1373051792f2ecaeefb66049825221d Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * | vim-patch:9.0.0770: quickfix commands may keep memory allocatedzeertzjq2023-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Quickfix commands may keep memory allocated. Solution: Free memory when it's a bit much. (Yegappan Lakshmanan, closes vim/vim#11379) https://github.com/vim/vim/commit/d8cd6f7427bc89aa38f42cc44f58bf5fb5f0f972 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
| * | vim-patch:9.0.0749: alloc/free of buffer for each quickfix entry is inefficientzeertzjq2023-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Alloc/free of buffer for each quickfix entry is inefficient. Solution: Use a shared grow array. (Yegappan Lakshmanan, closes vim/vim#11365) https://github.com/vim/vim/commit/975a665d4811649a51e2c6a97a6ce096290d87ae Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
| * | vim-patch:9.0.0736: quickfix listing does not handle very long messageszeertzjq2023-03-05
| |/ | | | | | | | | | | | | | | | | | | | | | | | | Problem: Quickfix listing does not handle very long messages. Solution: Use a growarray instead of a fixed size buffer. (Yegappan Lakshmanan, closes vim/vim#11357) https://github.com/vim/vim/commit/f8412c9d7cc487dacf47a217ae947da68a525c53 Override Test_very_long_error_line() with a rewrite that doesn't use deferred delete and string interpolation. Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>