aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* chore: suppress -Wunused-but-set-variable warnsLewis Russell2021-12-19
|
* fix(diagnostic): respect "if_many" source option for virtual text (#16653)Gregory Anders2021-12-17
| | | | | | | | The `prefix_source` function only evaluates the sources from the diagnostics passed to it; however, because each namespace draws its own virtual text, its diagnostics will never contain more than a single source (by definition). This requires changing the semantics of what "if_many" means from "multiple sources in a single 'batch' of diagnostics" to "multiple sources of all diagnostics within a buffer".
* fix(lsp): correctly align start and end range to codepoints during ↵Rishikesh Vaishnav2021-12-17
| | | | | | | | | | | | | | | | | | | | | incremental sync (#16670) Closes #16624 Fixes two issues with aligning the start position and end position to codepoints when calculating the start and end range. When aligning the start position: * use aligned byte index to calculate character index rather than the unadjusted byte When aligning the end position: * do not adjust the end byte if it falls on a UTF-8 codepoint * align byte to the first byte of the next codepoint rather than the last byte of the current codepoint * compute character character end range on the aligned byte index This commit also adds additional test coverage, including multibyte operations that previously failed before this commit.
* fix(lsp): call config on_exit handler before context is cleared (#16638)Gregory Anders2021-12-17
| | | | | | The on_exit handler provided to the client configuration is called after the client's context is cleared (e.g. which buffers the client was attached to). Calling the handler sooner allows these handlers to access the client object and do their own cleanup with the full context.
* Merge pull request #16681 from zeertzjq/vim-8.2.3825James McCoy2021-12-17
|\ | | | | vim-patch:8.2.3825: various comments could be improved
| * vim-patch:8.2.3825: various comments could be improvedzeertzjq2021-12-16
| | | | | | | | | | | | Problem: Various comments could be improved. Solution: Improve the comments. https://github.com/vim/vim/commit/52797bae1710621926c03a2611c40a692c96fb44
* | vim-patch:0e6adf8a29d5 (#16682)Christian Clason2021-12-16
| | | | | | | | Update runtime files https://github.com/vim/vim/commit/0e6adf8a29d5c2c96c42cc7157f71bf22c2ad471
* | refactor(diagnostic): remove hack (#16685)Gregory Anders2021-12-16
| | | | | | No longer required since #16548.
* | fix(diagnostic): assert that diagnostics have line number and column (#16683)Gregory Anders2021-12-16
| | | | | | | | | | | | | | Line number and column are required and much of the diagnostic API assumes that these are both present. When one of the two is missing, cryptic errors pop up in other parts of the diagnostic subsystem. Instead, assert that diagnostics are well formed when they are entered into the cache, which provides a clearer error.
* | perf: pre-compile embedded Lua source into bytecode (#16631)Gregory Anders2021-12-16
|/ | | | | | The Lua modules that make up vim.lua are embedded as raw source files into the nvim binary. These sources are loaded by the Lua runtime on startuptime. We can pre-compile these sources into Lua bytecode before embedding them into the binary, which minimizes the size of the binary and improves startuptime.
* Merge pull request #16617 from pekdon/forkptyJames McCoy2021-12-16
|\ | | | | fix: add forkpty for SunOS variants
| * fix: add forkpty for SunOS variantsClaes Nästén2021-12-12
| | | | | | | | | | forkpty is missing on Solaris < 11 and Illumos, provide fallback implementation for non Solaris 11 users.
* | Merge pull request #16134 from zeertzjq/screenpos-borderBjörn Linse2021-12-16
|\ \ | | | | | | fix(screenpos, float): add top and left border adjustment
| * | fix(screenpos, float): add top and left border adjustmentzeertzjq2021-12-15
| | |
* | | Merge pull request #16666 from mjlbach/fix/bad-castMichael Lingelbach2021-12-15
|\ \ \
| * | | chore: improve naming consistency in str_utf_startMichael Lingelbach2021-12-15
| | | |
| * | | fix: do not cast offset to char_uMichael Lingelbach2021-12-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * str_utf_start/end both cast the offset into the utf string to a char_u, a pointer + long is well-defined and the cast is unnecessary. This previously resulted in issues for offsets greater than 256.
* | | | docs(options): mention how to disable `inccommand` preview (#16534)Hitarth Thummar2021-12-15
| | | | | | | | | | | | Co-authored-by: Hitarth Thumma
* | | | docs: regenerate (#16468)github-actions[bot]2021-12-15
| | | | | | | | | | | | Co-authored-by: marvim <marvim@users.noreply.github.com>
* | | | fix(terminal): fix resize crash with pending scrollback (#14891)Sean Dewar2021-12-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | refresh_scrollback assumes pending scrollback rows exist only if the terminal window height decreased (or the screen was full). However, after accumulating scrollback, it's possible in some cases for the terminal height to increase before refresh_scrollback is called via invalidation (especially when the terminal buffer isn't initially displayed in a window before nvim_open_term), which may crash. As we'll have enough room for some scrollback rows, just append them to the top of the buffer until it fills the window, then continue with the previous logic for any remaining scrollback rows if necessary.
* | | | vim-patch:8.2.3814: .csx files and .sln files are not recognized (#16662)Christian Clason2021-12-15
| | | | | | | | | | | | | | | | | | | | Problem: .csx files and .sln files are not recognized. Solution: Add filetype patterns. (Doug Kearns) https://github.com/vim/vim/commit/cfabad9bcf45650dee1f1f41ec4047f82a12f323
* | | | fix(ui): close floating window on BufLeave event (#16557)ii142021-12-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When buffer is visible in two splits simultaneously, BufHidden event is not triggered, causing the floating window to remain on screen after switching to another buffer. Remove BufHidden event from close_events defaults, and close the window if we changed the buffer to something other than the buffer that spawned the floating window or the floating window buffer itself.
* | | | fix(quickfix): avoid O(N^2) when filling from string typval (#16654)Nicolas Hillegeer2021-12-15
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When filling a quickfix/loclist from a string-typed VimL variable, the complexity is O(N^2) in the number of lines in the variable. The problem is caused by using `xstrlcpy(3)` to copy the characters from the current position up to the next newline into the quickfix/loclist buffer in a loop. strlcpy(3) returns the length of `src`, so by necessity it has to compute `strlen(src)`. This means scanning the full rest of the typval on every iteration while only copying a small fraction (up to the next '\n'). This is not a problem whenever the srclen-to-copylen ratio is close to 1, which it usually is. But not in this case. Since we already calculated exactly how many bytes we want to copy, we should be using memcpy(3). This problem is not present in Vim, as it uses `vim_strncpy`, a `strncpy(3)`-alike, which stops at either `\0` or `n`, whichever comes first. The quickfix/loclist window can be filled using a: 1. File (used by commands like :grep/:make/... to source directly from their errorfile) 2. Buffer (used by :cbuffer and its variants) 3. Typval a. String (used by :cexpr and its variants) b. List of strings (used by setqflist(), setloclist(), :cepxr and its variants) This commit optimizes case (3a), especially when the typval is a long string. The pathological path is triggered by (e.g.) :grep enhancements as found in https://gist.github.com/romainl/56f0c28ef953ffc157f36cc495947ab3: function! Grep(...) return system(join([&grepprg] + a:000), ' ')) endfunction :cgetexpr Grep('foo') It would've been better for Neovim to use `systemlist` here, before this commit.
* | | test: expect the correct screen in TUI paste: big burst of input (#16656)zeertzjq2021-12-15
| | |
* | | Merge pull request #16606 from clason/bump-treesitterThomas Vigouroux2021-12-14
|\ \ \ | | | | | | | | build(deps): bump tree-sitter commit
| * | | build(deps): bump tree-sitter commitChristian Clason2021-12-10
| | | | | | | | | | | | | | | | | | | | bump tree-sitter to https://github.com/tree-sitter/tree-sitter/commit/25f64e1eb66bb1ab3eccd4f0b7da543005f3ba79 to fix query performance regression in 0.20.1
* | | | vim-patch:8.2.3805: i3config files are not recognized (#16645)Christian Clason2021-12-14
| | | | | | | | | | | | | | | | | | | | | | | | Problem: i3config files are not recognized. Solution: Add patterns to match i3config files. (Quentin Hibon, closes vim/vim#7969) https://github.com/vim/vim/commit/8176be159859deb9cf6455565bd7b24b3dcf17b9
* | | | Merge pull request #16602 from zeertzjq/tui-end-streamed-pasteJames McCoy2021-12-13
|\ \ \ \
| * | | | fix(tui): end streamed paste correctly when key buffer is emptyzeertzjq2021-12-10
| | | | |
* | | | | Merge pull request #16348 from lewis6991/queryThomas Vigouroux2021-12-13
|\ \ \ \ \ | | | | | | | | | | | | feat(treesitter): Support match queries on multiline nodes
| * | | | | feat(treesitter): multiline match predicatesLewis Russell2021-12-12
|/ / / / /
* | | | | feat(ts): add support for multiline nodes in get_node_text (#14999)Mathias Fußenegger2021-12-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on https://github.com/neovim/neovim/pull/14445 This extends `vim.treesitter.query.get_node_text` to return the text that spans a node's range even if start_row ~= end_row.
* | | | | fix(docs): add bufnr and user_data to diagnostic-structure (#16619)Mathias Fußenegger2021-12-11
| | | | |
* | | | | Merge pull request #16613 from bfredl/vim-patch-8.2.3777Björn Linse2021-12-11
|\ \ \ \ \ | | | | | | | | | | | | vim-patch:8.2.3777: spell file write error not checked
| * | | | | vim-patch:8.2.3777: spell file write error not checkedBjörn Linse2021-12-10
| | |/ / / | |/| | | | | | | | | | | | | | | | | | Problem: Spell file write error not checked. Solution: Check writing the prefix conditions. (Björn Linse, closes vim/vim#9323)
* | | | | Merge pull request #16614 from zeertzjq/test-remove-misc1Björn Linse2021-12-11
|\ \ \ \ \ | | | | | | | | | | | | test: remove references to misc1.c
| * | | | | test: remove references to misc1.czeertzjq2021-12-11
|/ / / / /
* | | | | Merge pull request #16607 from bfredl/no2misc1Björn Linse2021-12-10
|\ \ \ \ \ | | | | | | | | | | | | refactor: get rid of misc1.c ("functions that didn't seem to fit elsewhere")
| * | | | | refactor(misc1): move out high-level input functions to a new file: input.cBjörn Linse2021-12-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Possibly dialog code is messages.c could be moved here as well. misc1.c is now empty, so delete it.
| * | | | | refactor(misc1): move shell related functions to os/shell.cBjörn Linse2021-12-10
| | | | | |
| * | | | | refactor(misc1): move insertmode related function to edit.cBjörn Linse2021-12-10
| | | | | |
| * | | | | refactor(misc1): move way beep functions elsewhereBjörn Linse2021-12-10
| | | | | |
| * | | | | refactor(misc1): move msgmore function to messages.cBjörn Linse2021-12-10
| | | | | |
| * | | | | refactor(misc1): move comment related functions to change.cBjörn Linse2021-12-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are used in various places, but were grouped with open_line() which has a lot of comment prefix logic originally.
| * | | | | refactor(misc1): move user related code to os/users.cBjörn Linse2021-12-10
| |/ / / /
* | | | | docs(vim_diff.txt): document SearchWrapped (#16612)zeertzjq2021-12-10
| | | | |
* | | | | refactor: replace deprecated lua functions with their new versions (#16603)dundargoc2021-12-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling vim.lsp.buf.definition() sometimes gives a deprecation warning. This will likely solve that. Co-authored-by: Christian Clason <christian.clason@uni-due.de>
* | | | | runtime: support once on s:GetAutocmdPrefix (#16457)Koichi Shiraishi2021-12-10
| | | | | | | | | | | | | | | Signed-off-by: Koichi Shiraishi <zchee.io@gmail.com>
* | | | | feat: add autocommand event when search wraps around (#8487)Alejandro Exojo2021-12-10
|/ / / /
* / / / fix(lsp): create lsp requests with position offsets considering client ↵Rishikesh Vaishnav2021-12-10
|/ / / | | | | | | | | | | | | | | | encoding (#16382) Co-authored-by: black-desk <clx814727823@gmail.com> Co-authored-by: Mathias Fußenegger <mfussenegger@users.noreply.github.com>