aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* perf: reuse fast character size calculation algorithm from getvcol()VanaIgr2024-01-22
|
* perf: don't decode utf8 character multiple times in getvcol()VanaIgr2024-01-22
| | | | | | | | The optimized virtual column calculation loop in getvcol() was decoding the current character twice: once in ptr2cells() and the second time in utfc_ptr2len(). For combining charcters, they were decoded up to 2 times in utfc_ptr2len(). Additionally, the function used to decode the character could be further optimised.
* perf: remove loop for computing last position in getvcol()VanaIgr2024-01-18
| | | | | | | | The function computed the start of the multibyte character and iterated until the current character reached this position. The loop at the start of the function handed the case where the index passed to the function was past the end of the line. This loop can be removed if the function instead compares the next position against the end position end exits the loop if it is greater than the end position.
* perf: cache breakindent/showbreak width in win_lbr_chartabsizeVanaIgr2024-01-18
| | | | | | breakindent was recomputed on every call to win_lbr_charbabsize() when the character is past the end of the first row of a wrapped line. Even though the function for computing breakindent cached the last result, reusing the cached value required strcmp of the cached line with the given line.
* test: add screenpos() benchmarksVanaIgr2024-01-18
|
* fix(inccommand): improve preview buffer number handling (#27087)zeertzjq2024-01-19
|
* Merge pull request #27079 from lewis6991/winline_rfcLewis Russell2024-01-18
|\ | | | | refactor(drawline): more win_line() improvements
| * refactor(drawline): get_rightmost_vcol()Lewis Russell2024-01-18
| |
| * refactor(drawline): add more constsLewis Russell2024-01-18
| |
| * refactor(drawline): localise more variables in win_line()Lewis Russell2024-01-18
| |
| * refactor(drawline): more win_line() improvementsLewis Russell2024-01-18
| | | | | | | | | | | | | | | | `win_line()` previously used a conspicuous `ptrdiff_t v` variable in many different places for different reasons. The change encapsulates those uses and introduces local variables in each with a reduced scope. Also add `const` to some fields in winlinevars_T.
* | fix(treesitter): validate language alias for injectionsChristian Clason2024-01-18
|/ | | | | | | | Problem: Parsed language annotations can be random garbage so `nvim_get_runtime_file` throws an error. Solution: Validate that `alias` is a valid language name before trying to find a parser for it.
* docs(vim.iter): correct `bool` to `boolean` (#27018)notomo2024-01-18
|
* docs: various #25289Justin M. Keyes2024-01-18
| | | | | | Co-authored-by: Jongwook Choi <wookayin@gmail.com> Co-authored-by: Oliver Marriott <hello@omarriott.com> Co-authored-by: Benoit de Chezelles <bew@users.noreply.github.com> Co-authored-by: Jongwook Choi <wookayin@gmail.com>
* vim-patch:46d67d22b9baChristian Clason2024-01-18
| | | | | | | | | | | | | | | runtime(swayconfig): add focus_follows_mouse and smart_qaps syntax keywords See: https://github.com/swaywm/sway/blob/0aceff74696f03d306dc9de5473d9ed7afb73f67/sway/sway.5.scd?plain=1#L680 `focus_follows_mouse yes|no|always` https://github.com/swaywm/sway/blob/0aceff74696f03d306dc9de5473d9ed7afb73f67/sway/sway.5.scd?plain=1#L770 closes: vim/vim#13797 https://github.com/vim/vim/commit/46d67d22b9baa575de3ef2fb7ff430b11dfa1e26 Co-authored-by: James Eapen <james.eapen@vai.org>
* vim-patch:a39af0290496Christian Clason2024-01-18
| | | | | | | | | | | | | | | | runtime(i3config): remove always from `focus_follows_mouse` The always option does not exist in i3, only sway. From https://i3wm.org/docs/userguide.html: `focus_follows_mouse yes|no` Version number incremented by 2 because the last commit did not increment the version. https://github.com/vim/vim/commit/a39af02904966087b2af2372fa8233c4dfe149e3 Co-authored-by: James Eapen <james.eapen@vai.org>
* vim-patch:6e5a6c9965f6Christian Clason2024-01-18
| | | | | | | | runtime(netrw): minor changes to fix move cmd on windows (vim/vim#13823) https://github.com/vim/vim/commit/6e5a6c9965f667712494ae0a9df8a407267cc72f Co-authored-by: MiguelBarro <45819833+MiguelBarro@users.noreply.github.com>
* vim-patch:9.0.1437: test fails with different error number (#27074)zeertzjq2024-01-18
| | | | | | | | Problem: Test fails with different error number. Solution: Adjust the expected error. https://github.com/vim/vim/commit/3cdd799951b4d08f987a8346a8de544e41fab3d7 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* fix(drawline): update prev_ptr after getting syntax attrs (#27072)zeertzjq2024-01-18
|
* vim-patch:9.1.0040: issue with prompt buffer and hidden buffer (#27071)zeertzjq2024-01-18
| | | | | | | | | | | | Problem: Modifying a hidden buffer still interferes with prompt buffer mode changes. Solution: Save and restore b_prompt_insert. (zeertzjq) closes: vim/vim#13875 Modifying hidden buffer still interferes with prompt buffer mode changes https://github.com/vim/vim/commit/f267847017976ab85117bdf75b45e769836f8d69
* vim-patch:9.1.0039: too vague errors for 'listchars'/'fillchars' (#27070)zeertzjq2024-01-18
| | | | | | | | | | | | Problem: too vague errors for 'listchars'/'fillchars' Solution: Include the field name in error message. (zeertzjq) related: #27050 closes: vim/vim#13877 https://github.com/vim/vim/commit/6a8d2e1634f8f0d7463a2786dbcbe0f38dd287a7 Co-authored-by: Cole Frankenhoff <cole.nhf@gmail.com>
* fix(lua): return after assert returns assert message (#27064)altermo2024-01-17
|
* vim-patch:9b03d3e75b42 (#27059)Sean Dewar2024-01-17
| | | | | | | | | | | | | Translate the Vim9 script Godot files to legacy. `<scriptcmd>` is not ported yet, so replace it with `<Cmd>` and `<SID>`. If it's ported, `<scriptcmd>call s:` can be used instead. Includes changes from: vim-patch:0daafaa7d99e (was partial, but is now pretty much fully ported) vim-patch:9712ff1288f9 Co-authored-by: Maxim Kim <habamax@gmail.com>
* Merge pull request #27024 from lewis6991/test_followupLewis Russell2024-01-17
|\ | | | | test: big cleanup followup + typing
| * feat: add __call typing for vim.inspect()Lewis Russell2024-01-17
| |
| * test: fix mkdir()Lewis Russell2024-01-17
| |
| * test: move format_{string,luav} to a separate moduleLewis Russell2024-01-17
| |
| * test: improve helpers.argss_to_cmd()Lewis Russell2024-01-17
| |
| * test: fix helpers.relpath()Lewis Russell2024-01-17
| | | | | | | | Missing 3rd argument to string.gsub()
| * test: simplify helpers.sysname()Lewis Russell2024-01-17
| |
| * test: add type annotationsLewis Russell2024-01-17
| |
| * test: remove unused functionsLewis Russell2024-01-17
| | | | | | | | | | | | | | | | | | | | Removed: - `helpers.fixtbl()` - `helpers.fixtbl_rec()` - `helpers.updated()` - `helpers.hasenv()` - `helpers.is_arch()` - `helpers.isfile()`
| * test: refactor PathsLewis Russell2024-01-17
| |
| * test: remove test.deprecatedLewis Russell2024-01-17
| |
| * test: big cleanup followupLewis Russell2024-01-17
| | | | | | | | Followup to 07a7c0ec
* | fix(column): remove sign from line it was previously on with undoLuuk van Baal2024-01-17
| |
* | build(deps): bump tree-sitter-vimdoc to v2.1.0Christian Clason2024-01-17
| | | | | | | | Add support for `(note)`.
* | fix(column): pass kFalse when initializing "b_signcols.count"Luuk van Baal2024-01-17
|/ | | | | | | Problem: Wrong "clear" argument passed to buf_signcols_count_range when initializing "b_signcols.count" for the first time. Solution: Pass kFalse so that the "nested" counter is not incorrectly decremented.
* docs: various fixes (#26929)dundargoc2024-01-17
| | | | Co-authored-by: Patrick Bollinger <owner@pjbollinger.com> Co-authored-by: vilo1839 <139687192+vilo1839@users.noreply.github.com>
* vim-patch:9.1.0033: Insert mode not stopped if closing prompt buffer ↵zeertzjq2024-01-17
| | | | | | | | | | | | modifies hidden buffer (#27051) Problem: Insert mode not stopped if an autocommand modifies a hidden buffer while closing a prompt buffer. Solution: Don't set b_prompt_insert if stop_insert_mode is already set. (zeertzjq) closes: vim/vim#13872 https://github.com/vim/vim/commit/96958366ad6159efe708b694055320ed19357e61
* vim-patch:9.1.0035: i_CTRL-] triggers InsertCharPre (#27049)altermo2024-01-17
| | | | | | | | | | | | | | * vim-patch:9.1.0035: i_CTRL-] triggers InsertCharPre Problem: i_CTRL-] triggers InsertCharPre Solution: Return if CTRL-] is received. InsertCharPre is supposed to be only used for chars to be inserted but i_CTRL-] triggers expansion and is not inserted into the buffer (altermo) closes: vim/vim#13853 closes: vim/vim#13864 https://github.com/vim/vim/commit/7d711fe2092d0438d2df5054df735ec34926e2bc
* vim-patch:211211052d04 (#27048)Sean Dewar2024-01-16
| | | | | | | | | | | | | | | | | runtime(odin): include ftplugin, syntax and indent script (vim/vim#13867) https://github.com/vim/vim/commit/211211052d0426394cbd5f42f3f3f78a64822e2a Translate the files from Vim9 script to legacy Vim script. Notably: - Prefer case-matching comparisons where needed. - Save and restore `&cpo`. - Make the functions script-local. (Pretty easy to use these in expr options now since Vim 9.0 anyways) Add a note after the header for each file stating that they're manually translated. Co-authored-by: Maxim Kim <habamax@gmail.com>
* refactor(lsp): deprecate `vim.lsp.util.lookup_section`Jongwook Choi2024-01-16
| | | | | | | | This function is used only in the `workspace/configuration` handler, and does not warrant a public API because of its confusing return types. The only caller `vim.lsp.handlers["workspace.configuration"]` is also refactored to use `vim.tbl_get()` instead.
* test: use integers for API Buffer/Window/Tabpage EXT typesLewis Russell2024-01-16
|
* vim-patch:9.1.0013: Modula2 filetype support lacking (#27020)Sean Dewar2024-01-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Modula2 filetype support lacking Solution: Improve the Modula-2 runtime support, add additional modula2 dialects, add compiler plugin, update syntax highlighting, include syntax tests, update Makefiles (Doug Kearns) closes: vim/vim#6796 closes: vim/vim#8115 https://github.com/vim/vim/commit/68a89470693c7687d4e736ca056c05de632e3ac7 - Luaify the detection script: - Split the `(*!m2foo*)` and `(*!m2foo+bar*)` detection into two Lua patterns, as Lua capture groups cannot be used with `?` and friends (as they only work on character classes). - Use `vim.api.nvim_buf_call()` (ew) to call `modula2#SetDialect()` to ensure `b:modula2` is set for the given bufnr. - Skip the syntax screendump tests. (A shame as they test some of the detection from `(*!m2foo+bar*)` tags, but I tested this locally and it seems to work) - Port the synmenu.vim changes from Vim9 script. (Also tested this locally) - (And also add the missing comma for `b:browsefilter` from earlier.) Co-authored-by: Doug Kearns <dougkearns@gmail.com>
* Merge pull request #26938 from luukvbaal/relnumbfredl2024-01-16
|\ | | | | fix(column): redraw 'statuscolumn' on wrapped lines with 'relativenumber'
| * docs(column): 'statuscolumn' redraw interaction with 'relativenumber'Luuk van Baal2024-01-16
| |
| * fix(column): redraw 'statuscolumn' on wrapped lines with 'relativenumber'Luuk van Baal2024-01-16
|/ | | | | | | Problem: The 'statuscolumn' is not redrawn on the wrapped part of a line when moving the cursor with 'relativenumber' set. Solution: Redraw the 'statuscolumn' for the entire line height in the "col_rows" win_line() code path.
* fix(diagnostic): typingLewis Russell2024-01-16
|
* build(deps): bump tree-sitter to HEAD - 660481dbfChristian Clason2024-01-16
|