aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* docs: clarify that nvim_strwidth counts control characters as one cell (#18802)zeertzjq2022-05-31
|
* fix(docs): correct obsolete note about 'writedelay' in dev docsbfredl2022-05-31
|
* fix(logging): skip recursion, fix crash #18764Justin M. Keyes2022-05-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: 1. The main log routine does not protect itself against recursion. log_lock() doesn't guard against recursion, it would deadlock... 2. 22b52dd462e5 (#11501) regressed 6f27f5ef91b3 (#10172), because set_init_1..process_spawn tries to log (see backtrace below), but the mutex isn't initialized yet. Even if the mutex were valid, we don't want early logging to fallback to stderr because that can break embedders when stdio is used for RPC. frame 1: 0x00000001001d54f4 nvim`open_log_file at log.c:205:7 frame 2: 0x00000001001d5390 nvim`logmsg(log_level=1, context="UI: ", func_name=0x0000000000000000, line_num=-1, eol=true, fmt="win_viewport") at log.c:150:20 frame : 0x000000010039aea2 nvim`ui_call_win_viewport(grid=2, win=1000, topline=0, botline=1, curline=0, curcol=0, line_count=1) at ui_events_call.generated.h:321:3 frame 4: 0x00000001003dfefc nvim`ui_ext_win_viewport(wp=0x0000000101816400) at window.c:939:5 frame 5: 0x00000001003ec5b4 nvim`win_ui_flush at window.c:7303:7 frame 6: 0x00000001003a04c0 nvim`ui_flush at ui.c:508:3 frame 7: 0x00000001002966ba nvim`do_os_system(argv=0x0000600000c0c000, input=0x0000000000000000, len=0, output=0x0000000000000000, nread=0x00007ff7bfefe830, silent=false, forward_output=false) at shell.c:894:3 frame 8: 0x0000000100295f68 nvim`os_call_shell(cmd="unset nonomatch; vimglob() { while [ $# -ge 1 ]; do echo \"$1\"; shift; done }; vimglob >/var/folders/gk/3tttv_md06987tlwpyp62jrw0000gn/T/nvimwwvwfD/0 ~foo", opts=kShellOptExpand | kShellOptSilent | kShellOptHideMess, extra_args=0x0000000000000000) at shell.c:663:18 frame 9: 0x0000000100295845 nvim`call_shell(cmd="unset nonomatch; vimglob() { while [ $# -ge 1 ]; do echo \"$1\"; shift; done }; vimglob >/var/folders/gk/3tttv_md06987tlwpyp62jrw0000gn/T/nvimwwvwfD/0 ~foo", opts=kShellOptExpand | kShellOptSilent | kShellOptHideMess, extra_shell_arg=0x0000000000000000) at shell.c:712:14 frame 10: 0x0000000100294c6f nvim`os_expand_wildcards(num_pat=1, pat=0x00007ff7bfefeb20, num_file=0x00007ff7bfefee58, file=0x00007ff7bfefee60, flags=43) at shell.c:328:7 ... frame 23: 0x000000010028ccef nvim`expand_env_esc(srcp=",~foo", dst="~foo", dstlen=4094, esc=false, one=false, prefix=0x0000000000000000) at env.c:673:17 frame 24: 0x000000010026fdd5 nvim`option_expand(opt_idx=29, val=",~foo") at option.c:1950:3 frame 25: 0x000000010026f129 nvim`set_init_1(clean_arg=false) at option.c:558:19 frame 26: 0x00000001001ea25e nvim`early_init(paramp=0x00007ff7bfeff5f0) at main.c:198:3 frame 27: 0x00000001001ea6bf nvim`main(argc=1, argv=0x00007ff7bfeff848) at main.c:255:3 Solution: 1. Check for recursion, show "internal error" message. - FUTURE: when "remote TUI" is merged, can we remove log_lock()? 2. Skip logging if log_init wasn't called yet.
* refactor(api): use hashy hash for looking up api method and event namesbfredl2022-05-30
| | | | | This avoids generating khash tables at runtime, and is consistent with how evalfuncs lookup work.
* Merge pull request #18792 from famiu/feat/nvim_create_user_command/smodsbfredl2022-05-29
|\ | | | | feat(api): pass structured modifiers to commands
| * feat(nvim_create_user_command): pass structured modifiers to commandsFamiu Haque2022-05-29
| | | | | | | | | | | | | | Adds an `smods` key to `nvim_create_user_command` Lua command callbacks, which has command modifiers but in a structured format. This removes the need to manually parse command modifiers. It also reduces friction in using `nvim_cmd` inside a Lua command callback.
* | fix(winbar): set w_winrow_off when initializing firstwin size (#18793)zeertzjq2022-05-29
| |
* | vim-patch:8.2.5037: cursor position may be invalid after "0;" range (#18782)zeertzjq2022-05-29
|/ | | | | Problem: Cursor position may be invalid after "0;" range. Solution: Check the cursor position when it was set by ";" in the range. https://github.com/vim/vim/commit/4d97a565ae8be0d4debba04ebd2ac3e75a0c8010
* refactor(regexp_nfa.c): match where Vim calls fopen() (#18778)zeertzjq2022-05-28
|
* fix(winbar): only allow adding winbar when there is spaceFamiu Haque2022-05-28
|
* fix(winbar): fix winbar disappear or glitch when moving a split (#18775)zeertzjq2022-05-28
|
* fix(ui): require window-local value to show winbar on floating windows (#18773)Famiu Haque2022-05-28
| | | | | | | Previously, there was a bug where setting the local value of 'winbar' to itself would cause winbar to appear on a floating window, which is undesirable. This fix makes it so that it's explicitly required for the window-local value of 'winbar' for a floating window to be set in order for winbar to be shown on that window.
* vim-patch:8.2.5024: using freed memory with "]d" (#18762)zeertzjq2022-05-27
| | | | | Problem: Using freed memory with "]d". Solution: Copy the pattern before searching. https://github.com/vim/vim/commit/e2fa213cf571041dbd04ab0329303ffdc980678a
* Merge pull request #18306 from lewis6991/fnfastbfredl2022-05-26
|\ | | | | feat(lua): allow some viml functions to run in fast
| * feat(lua): allow some viml functions to run in fastLewis Russell2022-05-17
| | | | | | | | | | This change adds the necessary plumbing to annotate functions in funcs.c as being allowed in run in luv fast events.
* | refactor(normal): convert function comments to doxygen formatDundar Göc2022-05-26
| |
* | refactor: missing parenthesis may cause unexpected problems (#17443)kylo2522022-05-26
| | | | | | related vim-8.2.{4402,4639}
* | vim-patch:8.2.5015: Hoon and Moonscript files are not recognized (#18747)dundargoc2022-05-25
| | | | | | | | | | Problem: Hoon and Moonscript files are not recognized. Solution: Add filetype patterns. (Goc Dundar, closes vim/vim#10478) https://github.com/vim/vim/commit/bf82df0dd48a26404b92a596498b6892c9572c53
* | Merge pull request #18748 from dundargoc/ci/msvcJames McCoy2022-05-25
|\ \ | | | | | | ci(mingw): only enable -municode for MinGW
| * | ci(mingw): only enable -municode for MinGWDundar Goc2022-05-25
| | | | | | | | | | | | | | | | | | When enabling -municode for MSVC the following warning shows up: "LINK : warning LNK4044: unrecognized option '/municode'; ignored". This will ensure cleaner logs for the MSVC job.
* | | vim-patch:8.2.5016: access before start of text with a put command (#18742)zeertzjq2022-05-26
|/ / | | | | | | | | Problem: Access before start of text with a put command. Solution: Check the length is more than zero. https://github.com/vim/vim/commit/2a585c85013be22f59f184d49612074fd9b115d7
* | refactor(uncrustify): set maximum number of consecutive newlines to 2 (#18695)dundargoc2022-05-25
| |
* | Merge pull request #18528 from lewis6991/setwinoptbfredl2022-05-25
|\ \ | | | | | | feat(api): add `win` and `buf` to `nvim_set_option_value`
| * | feat(api): add win and buf to nvim_set_option_valueLewis Russell2022-05-17
| |/ | | | | | | Co-authored-by: Gregory Anders <8965202+gpanders@users.noreply.github.com>
* | vim-patch:8.2.5012: cannot select one character inside () (#18731)zeertzjq2022-05-25
| | | | | | | | | | | | Problem: Cannot select one character inside (). Solution: Do not try to extend the area if it is empty. (closes vim/vim#10472, closes vim/vim#6616) https://github.com/vim/vim/commit/53737b5eeeab1f95964f78b055d6094fab559533
* | fix(coverity): bail out if mouse_find_win() returns NULL (#18726)zeertzjq2022-05-25
| |
* | vim-patch:8.2.4999: filetype test table is not properly sorted (#18719)dundargoc2022-05-24
| | | | | | | | | | Problem: Filetype test table is not properly sorted. Solution: Sort by filetype. (Doug Kearns) https://github.com/vim/vim/commit/aa9729b652aa93b547b5c7006f54a143d99ea149
* | vim-patch:8.2.5009: fold may not be closeable after appending (#18722)Brandon Simmons2022-05-23
| | | | | | | | | | Problem: Fold may not be closeable after appending. Solution: Set the fd_small flag to MAYBE. (Brandon Simmons, closes vim/vim#10471) https://github.com/vim/vim/commit/e8c4a64bffbe628a46dc172d04cfc2db6e8dd8b6
* | Merge pull request #18712 from famiu/feat/ui/winbar_redrawbfredl2022-05-23
|\ \ | | | | | | fix(ui): redraw winbar alongside statusline
| * | fix(ui): redraw winbar alongside statuslineFamiu Haque2022-05-23
| | | | | | | | | | | | | | | Remove `w_redr_winbar` and use `w_redr_status` to redraw the winbar to ensure that winbar redraw is triggered alongside the statusline redraw.
* | | vim-patch:8.2.5008: when 'formatoptions' contains "/" wrongly wrapping ↵zeertzjq2022-05-23
|/ / | | | | | | | | | | | | | | comment (#18717) Problem: When 'formatoptions' contains "/" wrongly wrapping a long trailing comment. Solution: Pass the OPENLINE_FORMAT flag. https://github.com/vim/vim/commit/7e667788150be617aeac42b0d668618ac33ab9da
* | feat: click support for 'statusline', 'winbar' #18650Famiu Haque2022-05-23
| | | | | | | | The mouseclick item "%@" is now supported by 'statusline' and 'winbar'. Previously it was only supported by 'tabline'.
* | refactor!: delete insertmode (#18547)Gregory Anders2022-05-22
| | | | | | | | | | | | | | Neovim already removed `evim` (or any similar flags). The 'insertmode' option is a weird remnant, so get rid of it. The 'insertmode' option is replaced with a script that closely emulates the option. This script is documented at :help 'insertmode'
* | Merge pull request #18691 from zeertzjq/vim-8.2.4996zeertzjq2022-05-23
|\ \ | | | | | | vim-patch:8.2.{4996.5002}: setbufline(), deletebufline() may change Visual selection
| * | vim-patch:8.2.5002: deletebufline() may change Visual selectionzeertzjq2022-05-23
| | | | | | | | | | | | | | | | | | Problem: deletebufline() may change Visual selection. Solution: Disable Visual mode when using another buffer. (closes vim/vim#10469) https://github.com/vim/vim/commit/9b2edfd3bf2f14a1faaee9b62930598a2e77a798
| * | vim-patch:8.2.4996: setbufline() may change Visual selectionzeertzjq2022-05-23
| | | | | | | | | | | | | | | | | | Problem: setbufline() may change Visual selection. (Qiming Zhao) Solution: Disable Visual mode when using another buffer. (closes vim/vim#10466) https://github.com/vim/vim/commit/0ad00a7fd3e0389f565876521e395c35144d8009
* | | vim-patch:8.2.5001: checking translations affects the search pattern history ↵zeertzjq2022-05-23
|/ / | | | | | | | | | | | | (#18709) Problem: Checking translations affects the search pattern history. Solution: Use "keeppatterns". (Doug Kearns) https://github.com/vim/vim/commit/8a3704723c40779d688ef957dbe5bd8b65c25f95
* | build(clint): remove redundant checks #18698dundargoc2022-05-22
| | | | | | | | | | Uncrustify is the source of truth where possible. Remove any redundant checks from clint.py. See also https://github.com/neovim/neovim/pull/18563
* | Merge pull request #18646 from bfredl/winbarrulerbfredl2022-05-22
|\ \ | | | | | | fix(winbar): allow winbar to display a ruler
| * | fix(winbar): allow winbar to display the rulerbfredl2022-05-22
| | |
* | | fix(cid/352839): USE_AFTER_FREE in create_user_command #18669James McCoy2022-05-22
| | |
* | | Merge pull request #18608 from ckipp01/extmarkDocsbfredl2022-05-22
|\ \ \ | |/ / |/| | docs(extmark): remove message about passing in id=0
| * | docs(extmark): remove message about passing in id=0ckipp012022-05-18
| |/ | | | | | | | | | | | | | | | | | | | | | | The docs for `nvim_buf_set_extmark` mention that you can create a new extmark when passing in `id=0`, however if you do this you'll get an error since the code checks that id is positive. ``` id is not a positive integer ``` This change re-words the sentence to make it clearer.
* | fix(mksession): don't store floats in session #18635Daniel Steinberg2022-05-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: If there are floating windows when `:mksession` runs, the session cannot be properly restored. Solution: Change `:mksession` to skip floating windows. This matches Vim's treatment of popup windows. An alternative approach could have `:mksession` save floating windows that can be _properly_ restored (rather than skip them entirely, which is what this PR does). While that would seemingly be a more complete fix, that could present additional issues since floating windows are ordinarily created by plugins, and they may no longer be properly under a plugin's control when restored. closes #18432
* | vim-patch:8.2.4935: with 'foldmethod' "indent" some lines not included in ↵zeertzjq2022-05-22
| | | | | | | | | | | | | | | | fold (#18694) Problem: With 'foldmethod' "indent" some lines are not included in the fold. (Oleg Koshovetc) Solution: Fix it. (Brandon Simmons, closes vim/vim#10399, closes vim/vim#3214) https://github.com/vim/vim/commit/d98e75e23666c159c7e00bcf5b6ad9a933bb0534
* | fix(folds): fix fold regression with :move (#18685)zeertzjq2022-05-22
| |
* | vim-patch:8.2.4993: smart/C/lisp indenting is optional (#18684)zeertzjq2022-05-22
| | | | | | | | | | | | Problem: smart/C/lisp indenting is optional, which makes the code more complex, while it only reduces the executable size a bit. Solution: Graduate FEAT_CINDENT, FEAT_SMARTINDENT and FEAT_LISP. https://github.com/vim/vim/commit/8e145b82464a21ee4fdf7948f04e2a1d505f8bfa
* | vim-patch:8.2.4987: after deletion a small fold may be closable (#18683)Brandon Simmons2022-05-22
| | | | | | | | | | Problem: After deletion a small fold may be closable. Solution: Check for a reverse range. (Brandon Simmons, closes vim/vim#10457) https://github.com/vim/vim/commit/3fcccf94e8bc142d2c79c3b62087145896df6b36
* | Merge pull request #18682 from zeertzjq/vim-8.1.0535zeertzjq2022-05-22
|\ \ | | | | | | vim-patch:8.1.0535,8.2.4991: increment/decrement might get interrupted by updating folds
| * | vim-patch:8.2.4991: no test for hwat patch 8.1.0535 fixeszeertzjq2022-05-22
| | | | | | | | | | | | | | | | | | Problem: No test for hwat patch 8.1.0535 fixes. Solution: Add a test. (closes vim/vim#10462) https://github.com/vim/vim/commit/93c1573dd284dc9cf5ed9265a0143aaf520d2920