aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* 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
* 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.
* | | | 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(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.
* | | 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 #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 #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
| |/ / /
* / / / feat: add autocommand event when search wraps around (#8487)Alejandro Exojo2021-12-10
|/ / /
* | | Merge pull request #16597 from bfredl/nomisc1Björn Linse2021-12-10
|\ \ \ | |_|/ |/| | refactor: move out some long-hanging fruit from misc1.c
| * | refactor(misc1): move preserve_exit() to related functions in main.cBjörn Linse2021-12-09
| | |
| * | refactor(misc1): move out misc functions which obviously belong elsewhereBjörn Linse2021-12-09
| | | | | | | | | | | | Also make some function names more descriptive/regular.
| * | refactor(misc1): move out autocmd related functionsBjörn Linse2021-12-09
| | |
| * | refactor(misc1): move line_breakcheck family of functions to os/input.cBjörn Linse2021-12-09
| |/
* | Merge pull request #16541 from jamessan/vim-8.2.3664James McCoy2021-12-09
|\ \ | | | | | | vim-patch:8.2.3664,8.2.3743,8.2.3747,8.2.3748,8.2.3757
| * | vim-patch:8.2.3757: an overlong highlight group name is silently truncatedJames McCoy2021-12-08
| | | | | | | | | | | | | | | | | | Problem: An overlong highlight group name is silently truncated. Solution: Give an error if the name is too long. (closes vim/vim#9289) https://github.com/vim/vim/commit/f7f7aaf8aaad34a38d3f159e031c5bcf3394f8f1
| * | vim-patch:8.2.3748: giving an error for an empty sign argument breaks a pluginJames McCoy2021-12-08
| | | | | | | | | | | | | | | | | | Problem: Giving an error for an empty sign argument breaks a plugin. Solution: Do not give an error. https://github.com/vim/vim/commit/e5710a02cb78c2a0a868ea55740835c78ddecbb4
| * | vim-patch:8.2.3747: cannot remove highlight from an existing signJames McCoy2021-12-08
| | | | | | | | | | | | | | | | | | Problem: Cannot remove highlight from an existing sign. (James McCoy) Solution: Only reject empty argument for a new sign. https://github.com/vim/vim/commit/0bac5fc5e125b7aa0f3b596c9b7f4381279e6688
| * | vim-patch:8.2.3743: ":sign" can add a highlight group without a nameJames McCoy2021-12-08
| | | | | | | | | | | | | | | | | | Problem: ":sign" can add a highlight group without a name. Solution: Give an error if the group name is missing. (closes vim/vim#9280) https://github.com/vim/vim/commit/5e18ccc60bdddc4aa39ab039f1a7c918f29e67ce
| * | vim-patch:8.2.3664: cannot adjust sign highlighting for 'cursorline'James McCoy2021-12-08
| |/ | | | | | | | | | | | | Problem: Cannot adjust sign highlighting for 'cursorline'. Solution: Add CursorLineSign and CursorLineFold highlight groups. (Gregory Anders, closes vim/vim#9201) https://github.com/vim/vim/commit/e413ea04b716effb28eb49dbc98ad3f9f761545a
* | Merge pull request #16414 from zeertzjq/terminal-no-invalid-rowsJames McCoy2021-12-09
|\ \ | | | | | | fix(terminal): return early if there are no invalid rows
| * | fix(terminal): return early if there are no invalid rowszeertzjq2021-12-08
| | | | | | | | | | | | Prevent on_lines emitting out-of-bounds line indexes.
* | | Merge pull request #16547 from pekdon/sunosJames McCoy2021-12-09
|\ \ \ | | | | | | | | Portability improvements, first steps at getting neovim on x86_64 SunOS
| * | | fix: don't use cfsetspeed, use i and o variantsClaes Nästén2021-12-07
| | | | | | | | | | | | | | | | | | | | cfsetspeed is not available on SunOS, use cfsetispeed and cfsetospeed instead.
| * | | fix: don't include pty.h on SunOSClaes Nästén2021-12-07
| | | |
| * | | fix: add STRNLEN compatability macroClaes Nästén2021-12-06
| | | | | | | | | | | | | | | | | | | | Older SunOS systems come without strnlen, add STRNLEN macro in line with the other str* compat macros.
| * | | fix: define NAME_MAX from _XOPEN_NAME_MAXClaes Nästén2021-12-06
| | | | | | | | | | | | | | | | | | | | On SunOS NAME_MAX is not defined, _XOPEN_NAME_MAX is so fall back to defining NAME_MAX from _XOPEN_NAME_MAX.
| * | | fix: skip libutil on SunOSClaes Nästén2021-12-06
| | | | | | | | | | | | | | | | | | | | libutil is not available on Solaris variants, even on Solaris 11 where forkpty is available.
* | | | vim-patch:8.2.3769: zig files are not recognized (#16598)Christian Clason2021-12-09
| |_|/ |/| | | | | | | | | | | Problem: Zig files are not recognized. Solution: Add *.zig. (Gregory Anders, closes vim/vim#9313) https://github.com/vim/vim/commit/4c8c634365bc6d4d462635aed5e0f7ad2262d590
* | | Merge pull request #16418 from zeertzjq/terminal-coladvanceJames McCoy2021-12-08
|\ \ \ | | | | | | | | fix(terminal): use coladvance() to calculate buffer cursor position
| * | | fix(terminal): use coladvance() to calculate buffer cursor positionzeertzjq2021-12-08
| | |/ | |/|
* | | fix: check for interrupt in nvim_echo, write_msg and nlua_print (#16537)ii142021-12-08
| | | | | | | | | | | | | | | Fixes `q` in more pager, where `:highlight` can be quit out of with a single `q` keystroke, while in `:lua print(vim.inspect(vim))` it just scrolls down a page.
* | | fix(api): allow nvim_buf_set_extmark to accept end_row key (#16548)Gregory Anders2021-12-08
| | | | | | | | | | | | | | | | | | | | | nvim_buf_get_extmark uses "end_row" rather than "end_line" in its 'details' dict, which means callers must modify the key names if they want to re-use the information. Change the parameter name in nvim_buf_set_extmark to "end_row" and use "end_line" as an alias to make this more consistent.
* | | Merge pull request #16421 from seandewar/vim-8.1.0035Jan Edmund Lazo2021-12-07
|\ \ \ | |/ / |/| | vim-patch:8.1.{35,42,64},8.2.{1781,1783,1976,2014,3671}