aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
* feat(log): use "ui" as default name for TUI client #30345Justin M. Keyes2024-09-11
| | | | | | | | | | | | | The default "session name" for the builtin TUI is "ui". before: INF 2024-09-10T14:57:35.385 hello.sock os_exit:692: Nvim exit: 1 INF 2024-09-10T14:57:35.388 ?.4543 os_exit:692: Nvim exit: 1 after: INF 2024-09-10T14:59:19.919 hello.sock os_exit:692: Nvim exit: 1 INF 2024-09-10T14:59:19.922 ui.5684 os_exit:692: Nvim exit: 1
* fix: replace NVIM with Nvim in default titlestring (#30348)Gregory Anders2024-09-11
|
* vim-patch:9.1.0727: too many strlen() calls in option.c (#30338)zeertzjq2024-09-10
| | | | | | | | | | | Problem: too many strlen() calls in option.c Solution: refactor the code to reduce the number of strlen() calls (John Marriott) closes: vim/vim#15604 https://github.com/vim/vim/commit/95dacbb5fd53f76a7e369c554aaa02e86b81eca8 Co-authored-by: John Marriott <basilisk@internode.on.net>
* vim-patch:d657d3d: runtime(doc): clarify the effect of the timeout for ↵zeertzjq2024-09-11
| | | | | | | | | | search()-functions (#30337) related: vim/vim#15657 related: vim/vim#15404 https://github.com/vim/vim/commit/d657d3d8fd635dbd78402358788dc58a96d04117 Co-authored-by: Christian Brabandt <cb@256bit.org>
* Merge pull request #30295 from glepnir/nfloatbfredl2024-09-10
|\ | | | | fix(highlight): floating windows inherit NormalFloat from global-ns
| * fix(highlight): floating windows inherit NormalFloat from global-nsglepnir2024-09-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: floating windows did not correctly inherit the NormalFloat highlight group from the global namespace when it was not defined in the window-specific namespace. This led to floating windows losing their background highlight when switching between namespaces. Solution: Updated the window highlight logic in update_window_hl() to handle the fallback. This fix resolves issues with floating window backgrounds not displaying as expected in certain namespace configurations.
* | refactor(os/input.c): rename os_inchar => input_get #30327Justin M. Keyes2024-09-10
| | | | | | | | | | | | | | | | | | | | | | Problem: The name `os_inchar` (from Vim's old `mch_inchar`) is ambiguous: "inchar" sounds like it could be reading or enqueuing (setting) input. Its docstring is also ambiguous. Solution: - Rename `os_inchar` to `input_get`. - Write some mf'ing docstrings. - Add assert() in TRY_READ().
* | fix(server): CID 509282: DEADCODE #30316Justin M. Keyes2024-09-09
| | | | | | listen_addr cannot be NULL at this point.
* | fix(startup): server fails if $NVIM_APPNAME is relative dir #30310Justin M. Keyes2024-09-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: If $NVIM_APPNAME is a relative dir path, Nvim fails to start its primary/default server, and `v:servername` is empty. Root cause is d34c64e342dfba9248d1055e702d02620a1b31a8, but this wasn't noticed until 96128a5076b7 started reporting the error more loudly. Solution: - `server_address_new`: replace slashes "/" in the appname before using it as a servername. - `vim_mktempdir`: always prefer the system-wide top-level "nvim.user/" directory. That isn't intended to be specific to NVIM_APPNAME; rather, each *subdirectory* ("nvim.user/xxx") is owned by each Nvim instance. Nvim "apps" can be identified by the server socket(s) stored in those per-Nvim subdirs. fix #30256
* | fix(startup): ignore broken $XDG_RUNTIME_DIR #30285Justin M. Keyes2024-09-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: $XDG_RUNTIME_DIR may be broken on WSL, which prevents starting (and even building) Nvim. #30282 Solution: - When startup fails, mention the servername in the error message. - If an autogenerated server address fails, log an error and continue with an empty `v:servername`. It's only fatal if a user provides a bad `--listen` or `$NVIM_LISTEN_ADDRESS` address. Before: $ nvim --headless --listen ./hello.sock nvim: Failed to --listen: "address already in use" $ NVIM_LISTEN_ADDRESS='./hello.sock' ./build/bin/nvim --headless nvim: Failed to --listen: "address already in use" After: $ nvim --headless --listen ./hello.sock nvim: Failed to --listen: address already in use: "./hello.sock" $ NVIM_LISTEN_ADDRESS='./hello.sock' ./build/bin/nvim --headless nvim: Failed $NVIM_LISTEN_ADDRESS: address already in use: "./hello.sock"
* | vim-patch:9.1.0720: Wrong breakindentopt=list:-1 with multibyte or TABs (#30293)zeertzjq2024-09-07
| | | | | | | | | | | | | | | | | | | | Problem: Wrong breakindentopt=list:-1 with multibyte chars or TABs in text matched by 'formatlistpat' (John M Devin) Solution: Use the width of the match text (zeertzjq) fixes: vim/vim#15634 closes: vim/vim#15635 https://github.com/vim/vim/commit/61a6ac4d0066317131528f1b3ecc3b3a2599a75c
* | vim-patch:9.1.0719: Resetting cell widths can make 'listchars' or ↵zeertzjq2024-09-06
| | | | | | | | | | | | | | | | | | | | | | 'fillchars' invalid (#30289) Problem: Resetting cell widths can make 'listchars' or 'fillchars' invalid. Solution: Check for conflicts when resetting cell widths (zeertzjq). closes: vim/vim#15629 https://github.com/vim/vim/commit/66f65a46c5d169f20f780721d4f74d4729855b96
* | Merge pull request #30236 from luukvbaal/invalidbfredl2024-09-06
|\ \ | | | | | | fix(decor): revise marktree metadata for invalid marks
| * | fix(decor): exclude invalid marks from meta totalLuuk van Baal2024-09-04
| |/ | | | | | | | | | | Problem: Marktree meta count still includes invalidated marks, making guards that check the meta total ineffective. Solution: Revise marktree metadata when in/revalidating a mark.
* | Merge pull request #30272 from bfredl/replace_emojibfredl2024-09-06
|\ \ | | | | | | fix(multibyte): handle backspace of wide clusters in replace mode
| * | fix(multibyte): handle backspace of wide clusters in replace modebfredl2024-09-06
| |/ | | | | | | | | Make utf_head_off more robust against invalid sequences and embedded NUL chars
* | vim-patch:9.1.0717: Unnecessary nextcmd NULL checks in ↵zeertzjq2024-09-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | parse_command_modifiers() (#30275) Problem: Unnecessary nextcmd NULL checks in parse_command_modifiers(). Solution: Remove them (zeertzjq) Every place parse_command_modifiers() is called, nextcmd is NULL, and after it's set to non-NULL the function returns very soon. Even if one day nextcmd may be non-NULL, the NULL checks may still be wrong as the correct behavior may be overriding nextcmd. closes: vim/vim#15620 https://github.com/vim/vim/commit/f7b8609446f171a6a287f61564e39a8dac5ff47d
* | vim-patch:9.1.0716: resetting setcellwidth() doesn't update the screen (#30274)zeertzjq2024-09-06
| | | | | | | | | | | | | | | | | | | | Problem: resetting setcellwidth() doesn't update the screen Solution: Redraw after clearing the cellwidth table (Ken Takata) closes: vim/vim#15628 https://github.com/vim/vim/commit/539e9b571ae2a80dfa8a42eb132ad9f65f0bbcbc Co-authored-by: Ken Takata <kentkt@csc.jp>
* | refactor(vterm): inline REFLOW macroPaul "LeoNerd" Evans2024-09-05
| | | | | | | | cherry-picked from https://github.com/neovim/libvterm/commit/dfc4c5e5b3dd99247dc95031a8f40087f181dea5
* | refactor: adopt termkey and eliminate duplicate codedundargoc2024-09-05
|/ | | | | | | | | Termkey is abandoned and it's now our code, so there's no reason not to treat it as such. An alternative approach could be to have a proper repo that we maintain such as with unibilium, although with this approach we can make a few assumptions that will allow us to remove more code. Also eliminate duplicate code from both termkey and libvterm.
* vim-patch:9.1.0713: Newline causes E749 in Ex mode (#30254)zeertzjq2024-09-04
| | | | | | | | | | Problem: Newline causes E749 in Ex mode (after 9.1.0573). Solution: Don't execute empty command followed by a newline. closes: vim/vim#15614 https://github.com/vim/vim/commit/2432b4a75321a1a9ac0f9b326c7e46d38bdb71bb Cherry-pick code change from patch 8.2.3405.
* docs: use "nvim" in swapfile message #30250こけっち2024-09-03
| | | | | | | Problem: The message E325 displays “vim -r” to recover the file. Solution: Change the message to display “nvim -r” instead of “vim -r”.
* fix(api): nvim_buf_get_text() crashes with large negative column #28740vanaigr2024-09-03
| | | | | | | | | | Problem: crash when calling nvim_buf_get_text() with a large negative start_col: call nvim_buf_get_text(0, 0, -123456789, 0, 0, {}) Solution: clamp start_col after subtracting it from the line length.
* Merge pull request #30232 from bfredl/emoji2bfredl2024-09-03
|\ | | | | fix(mbyte): mark any 0xFE0F sequence as a TUI ambiguous width char
| * fix(mbyte): mark any 0xFE0F sequence as a TUI ambiguous width charbfredl2024-09-02
| | | | | | | | | | | | | | | | | | Some sequences beginning with ASCII might be rendered as emoji, as for instance emoji 1️⃣ which is encoded as ascii 0x31 + U+FE0F + U+20E3. While it is tricky to make the width of such sequences configurable, we can make TUI be careful with such sequences and reset the cursor, just like for Extended_Pictogram based sequences.
* | feat(startup): validate --listen addressJustin M. Keyes2024-09-02
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: `nvim --listen` does not error on EADDRINUSE. #30123 Solution: Now that `$NVIM_LISTEN_ADDRESS` is deprecated and input *only* (instead of the old, ambiguous situation where it was both an input *and* an output), we can be fail fast instead of trying to "recover". This reverts the "recovery" behavior of 704ba4151e7f67999510ee0ac19fdabb595d530c, but that was basically a workaround for the fragility of `$NVIM_LISTEN_ADDRESS`.
* | docs: misc #28970Justin M. Keyes2024-09-01
|/
* vim-patch:9.1.0708: Recursive window update does not account for reset ↵luukvbaal2024-09-01
| | | | | | | | | | skipcol (#30217) Problem: Window is updated with potentially invalid skipcol in recursive window update path. I.e. cursor outside of visible range in large line that does not fit. Solution: Make sure it is valid (Luuk van Baal). https://github.com/vim/vim/commit/3d5065fc7553c8de3d0555c3085165bdd724663b
* fix(completion): don't include <Lua function> in -complete= (#30209)zeertzjq2024-09-01
|
* vim-patch:9.1.0704: inserting with a count is inefficient (#30206)zeertzjq2024-09-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: inserting with a count is inefficient Solution: Disable calculation of the cursor position and topline, if a count has been used (Ken Takata) Optimize insertion when using :normal 10000ix. This patch optimizes the insertion with a large count (e.g. `:normal 10000ix`). It seems that calculation of the cursor position for a long line is slow and it takes O(n^2). Disable the calculation if not needed. Before: ``` $ time ./vim --clean -c 'normal 10000ix' -cq! real 0m1.879s user 0m1.328s sys 0m0.139s $ time ./vim --clean -c 'normal 20000ix' -cq! real 0m5.574s user 0m5.421s sys 0m0.093s $ time ./vim --clean -c 'normal 40000ix' -cq! real 0m23.588s user 0m23.187s sys 0m0.140s ``` After: ``` $ time ./vim --clean -c 'normal 10000ix' -cq! real 0m0.187s user 0m0.046s sys 0m0.093s $ time ./vim --clean -c 'normal 20000ix' -cq! real 0m0.217s user 0m0.046s sys 0m0.108s $ time ./vim --clean -c 'normal 40000ix' -cq! real 0m0.278s user 0m0.093s sys 0m0.140s $ time ./vim --clean -c 'normal 80000ix' -cq! real 0m0.494s user 0m0.311s sys 0m0.140s $ time ./vim --clean -c 'normal 160000ix' -cq! real 0m1.302s user 0m1.140s sys 0m0.094s ``` closes: vim/vim#15588 https://github.com/vim/vim/commit/09b80d23cfae24fa13ef4f52b0ec90625839a6ab Co-authored-by: Ken Takata <kentkt@csc.jp>
* vim-patch:9.1.0707: [security]: invalid cursor position may cause a crash ↵zeertzjq2024-09-01
| | | | | | | | | | | | | | | | (#30204) Problem: [security]: invalid cursor position may cause a crash (after v9.1.0038) Solution: Set cursor to the last character in a line, if it would otherwise point to beyond the line; no tests added, as it is unclear how to reproduce this. Github Advisory: https://github.com/vim/vim/security/advisories/GHSA-4ghr-c62x-cqfh https://github.com/vim/vim/commit/396fd1ec2956307755392a1c61f55d5c1847f308 Co-authored-by: Christian Brabandt <cb@256bit.org>
* refactor(multibyte): replace generated unicode tables with utf8procbfredl2024-08-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit intentionally aims at preserving existing behavior as much as possible while replacing our build step to convert unicode data files into binary tables, which corresponding lookups in utf8proc. Actual improvements in behavior will be a followup. The only change in behavior is that 'emoji' option will turn some more codepoints into double with. Nvim used the "Emoji" and "Emoji_Presentation" properties to define emojis, while utf8proc only exposes the Extended_Pictographic property from the emoji table. This is a superset of the previous emoji properties. As only codepoints above 0x1f000 are affected by the 'emoji' option, this means that the following chars are now treated as double-width, instead of single-width like in previous nvim versions: 🀀 🀁 🀂 🀃 🀅 🀆 🀇 🀈 🀉 🀊 🀋 🀌 🀍 🀎 🀏 🀐 🀑 🀒 🀓 🀔 🀕 🀖 🀗 🀘 🀙 🀚 🀛 🀜 🀝 🀞 🀟 🀠 🀡 🀢 🀣 🀤 🀥 🀦 🀧 🀨 🀩 🀪 🀫 🀰 🀱 🀲 🀳 🀴 🀵 🀶 🀷 🀸 🀹 🀺 🀻 🀼 🀽 🀾 🀿 🁀 🁁 🁂 🁃 🁄 🁅 🁆 🁇 🁈 🁉 🁊 🁋 🁌 🁍 🁎 🁏 🁐 🁑 🁒 🁓 🁔 🁕 🁖 🁗 🁘 🁙 🁚 🁛 🁜 🁝 🁞 🁟 🁠 🁡 🁢 🁣 🁤 🁥 🁦 🁧 🁨 🁩 🁪 🁫 🁬 🁭 🁮 🁯 🁰 🁱 🁲 🁳 🁴 🁵 🁶 🁷 🁸 🁹 🁺 🁻 🁼 🁽 🁾 🁿 🂀 🂁 🂂 🂃 🂄 🂅 🂆 🂇 🂈 🂉 🂊 🂋 🂌 🂍 🂎 🂏 🂐 🂑 🂒 🂓 🂠 🂡 🂢 🂣 🂤 🂥 🂦 🂧 🂨 🂩 🂪 🂫 🂬 🂭 🂮 🂱 🂲 🂳 🂴 🂵 🂶 🂷 🂸 🂹 🂺 🂻 🂼 🂽 🂾 🂿 🃁 🃂 🃃 🃄 🃅 🃆 🃇 🃈 🃉 🃊 🃋 🃌 🃍 🃎 🃑 🃒 🃓 🃔 🃕 🃖 🃗 🃘 🃙 🃚 🃛 🃜 🃝 🃞 🃟 🃠 🃡 🃢 🃣 🃤 🃥 🃦 🃧 🃨 🃩 🃪 🃫 🃬 🃭 🃮 🃯 🃰 🃱 🃲 🃳 🃴 🃵 🄍 🄎 🄏 🄯 🅬 🅭 🅮 🅯 🆭 🌢 🌣 🎔 🎕 🎘 🎜 🎝 🏱 🏲 🏶 📾 🕆 🕇 🕈 🕏 🕨 🕩 🕪 🕫 🕬 🕭 🕮 🕱 🕲 🕻 🕼 🕽 🕾 🕿 🖀 🖁 🖂 🖃 🖄 🖅 🖆 🖈 🖉 🖎 🖏 🖑 🖒 🖓 🖔 🖗 🖘 🖙 🖚 🖛 🖜 🖝 🖞 🖟 🖠 🖡 🖢 🖣 🖦 🖧 🖩 🖪 🖫 🖬 🖭 🖮 🖯 🖰 🖳 🖴 🖵 🖶 🖷 🖸 🖹 🖺 🖻 🖽 🖾 🖿 🗀 🗁 🗅 🗆 🗇 🗈 🗉 🗊 🗋 🗌 🗍 🗎 🗏 🗐 🗔 🗕 🗖 🗗 🗘 🗙 🗚 🗛 🗟 🗠 🗢 🗤 🗥 🗦 🗧 🗩 🗪 🗫 🗬 🗭 🗮 🗰 🗱 🗲 🗴 🗵 🗶 🗷 🗸 🗹 🛆 🛇 🛈 🛉 🛊 🛓 🛔 🛦 🛧 🛨 🛪 🛱 🛲 🝴 🝵 🝶 🝻 🝼 🝽 🝾 🝿 🟕 🟖 🟗 🟘 🟙 🢰 🢱 🨀 🨁 🨂 🨃 🨄 🨅 🨆 🨇 🨈 🨉 🨊 🨋 🨌 🨍 🨎 🨏 🨐 🨑 🨒 🨓 🨔 🨕 🨖 🨗 🨘 🨙 🨚 🨛 🨜 🨝 🨞 🨟 🨠 🨡 🨢 🨣 🨤 🨥 🨦 🨧 🨨 🨩 🨪 🨫 🨬 🨭 🨮 🨯 🨰 🨱 🨲 🨳 🨴 🨵 🨶 🨷 🨸 🨹 🨺 🨻 🨼 🨽 🨾 🨿 🩀 🩁 🩂 🩃 🩄 🩅 🩆 🩇 🩈 🩉 🩊 🩋 🩌 🩍 🩎 🩏 🩐 🩑 🩒 🩓 🩠 🩡 🩢 🩣 🩤 🩥 🩦 🩧 🩨 🩩 🩪 🩫 🩬 🩭
* vim-patch:9.1.0684: completion is inserted on Enter with "noselect" (#30111)glepnir2024-08-31
| | | | | | | | | | | Problem: completion is inserted on Enter with "noselect" (Carman Fu) Solution: check noselect before update compl_shown_match (glepnir) fixes: vim/vim#15526 closes: vim/vim#15530 https://github.com/vim/vim/commit/753794bae8a9401903b82e5c5d1f35a106aa912a
* refactor(plines): correct double-width condition (#30200)zeertzjq2024-08-31
| | | | | To check for a non-ASCII character, the condition should be >= 0x80, not > 0x80. In this case it doesn't really matter as the 0x80 character is unprintable and occupies 4 cells, but still make it consistent.
* fix(completion): fix inconsistent Enter behavior (#30196)zeertzjq2024-08-31
| | | | | | Problem: Behavior of Enter in completion depends on typing speed. Solution: Don't make whether Enter selects original text depend on whether completion has been interrupted, which can happen interactively with a slow completion function.
* feat(mbyte): support extended grapheme clusters including more emojibfredl2024-08-30
| | | | | | | | | Use the grapheme break algorithm from utf8proc to support grapheme clusters from recent unicode versions. Handle variant selector VS16 turning some codepoints into double-width emoji. This means we need to use ptr2cells rather than char2cells when possible.
* fix(highlight): update `PmenuSel` for colored completion items #30183Evgeni Chasnovski2024-08-29
| | | | | | | | | | | | | | | | | | | | | Problem: completion items can now have dedicated highlighting (through `hl_group` and `kind_hlgroup` fields). Both of the fields combine their highlight attributes with the underlying `PmenuXxx` group. As default color scheme `Pmenu` and `PmenuSel` are intentionally almost inverted versions of one another, the added highlighting will be unreadable in one of them if done only through foreground (which is the most convenient way for users and being able to do so is arguably the biggest benefit of actually combining added highlighting). Solution: adjust `PmenuSel` to utilize `attr=reverse`. This works because `fg`/`bg` are first combined and only then reversed. This results in a colored background for items with `hl_group` and `kind_hlgroup` using text highlighting. This also results in the same background for regular selected item, while intentionally changing foreground from `Nvim{Light,Dark}Grey3` to (essentially) `Nvim{Light,Dark}Grey2`. This both provides better contrast ratio and does not need realigning of the whole block.
* Merge pull request #26950 from bfredl/s390x_fixbfredl2024-08-29
|\ | | | | fix issues with s390x CI on master (xdiff and others)
| * fix(build): issues with s390x CIbfredl2024-08-29
| | | | | | | | | | Does not fix everything, but at least let's test run to finish before timeout
* | docs(eval): fix wrong return type of getcharsearch() (#30176)glepnir2024-08-29
|/
* vim-patch:9.1.0699: "dvgo" is not always an inclusive motion (#30173)zeertzjq2024-08-29
| | | | | | | | | | | | Problem: "dvgo" is not always an inclusive motion (Iain King-Speir) Solution: initialize the inclusive flag to false fixes: vim/vim#15580 closes: vim/vim#15582 https://github.com/vim/vim/commit/f8702aeb8ff85554d909901ae45b50c3d532bf70 Co-authored-by: Christian Brabandt <cb@256bit.org>
* docs: misc (#29719)dundargoc2024-08-29
| | | | | | | | | Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com> Co-authored-by: Lauri Heiskanen <lauri.heiskanen@nimble.fi> Co-authored-by: Piotr Doroszewski <5605596+Doroszewski@users.noreply.github.com> Co-authored-by: Tobiasz Laskowski <tobil4sk@outlook.com> Co-authored-by: ariel-lindemann <41641978+ariel-lindemann@users.noreply.github.com> Co-authored-by: glepnir <glephunter@gmail.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* fix(regexp): fix typo in E888 error message (#30161)Eisuke Kawashima2024-08-28
| | | Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
* feat(treesitter): add support for wasm parsersLewis Russell2024-08-26
| | | | | | | | | | | | | | | | | | | | Problem: Installing treesitter parser is hard (harder than climbing to heaven). Solution: Add optional support for wasm parsers with `wasmtime`. Notes: * Needs to be enabled by setting `ENABLE_WASMTIME` for tree-sitter and Neovim. Build with `make CMAKE_EXTRA_FLAGS=-DENABLE_WASMTIME=ON DEPS_CMAKE_FLAGS=-DENABLE_WASMTIME=ON` * Adds optional Rust (obviously) and C11 dependencies. * Wasmtime comes with a lot of features that can negatively affect Neovim performance due to library and symbol table size. Make sure to build with minimal features and full LTO. * To reduce re-compilation times, install `sccache` and build with `RUSTC_WRAPPER=<path/to/sccache> make ...`
* vim-patch:9.1.0692: Wrong patlen value in ex_substitute() (#30131)zeertzjq2024-08-24
| | | | | | | | | | | | Problem: Wrong patlen value in ex_substitute() (after 9.1.0426). Solution: Compute patlen after finding end separator. (zeertzjq) Add a more explicit test. The test already passes as the only case where a overlarge patlen value matters was fixed by patch 9.1.0689. closes: vim/vim#15565 https://github.com/vim/vim/commit/d1c8d2de4b9fa44b3d2b39b7ed8b92846c5502b7
* vim-patch:9.1.0690: cannot set special highlight kind in popupmenu (#30128)zeertzjq2024-08-24
| | | | | | | | | | | Problem: cannot set special highlight kind in popupmenu Solution: add kind_hlgroup item to complete function (glepnir) closes: vim/vim#15561 https://github.com/vim/vim/commit/38f99a1f0d61e9bde3f4a3d0cbe2d06185c4a57f Co-authored-by: glepnir <glephunter@gmail.com>
* vim-patch:9.1.0683: mode() returns wrong value with <Cmd> mapping (#30109)zeertzjq2024-08-22
| | | | | | | | | | | Problem: mode() returns wrong value with <Cmd> mapping Solution: Change decision priority of VIsual_active and move visual mode a bit further down (kuuote) closes: vim/vim#15533 https://github.com/vim/vim/commit/0fd1cb1b1fc90b68cb37f71e65289eadac3588a6 Co-authored-by: kuuote <znmxodq1@gmail.com>
* fix(decor): don't use separate DecorSignHighlight for url (#30096)zeertzjq2024-08-20
|
* fix(terminal): interrupt/got_int hangs terminal (#30056)ibhagwan2024-08-20
| | | | | | | | | | | | | | | | | | | | | | | | | | Upon `terminal_enter`, `mapped_ctrl_c` is set in order to avoid `CTRL-C` interrupts (which is proxied to the terminal process instead), `os_inchar` will then test `mapped_ctrl_c` against `State` and set `ctrl_c_interrupts=false` which prevents `process_ctrl_c` from setting `got_int=true` in a terminal state. However, if `got_int` is set outside of `process_ctrl_c`, e.g. via `interrupt()`, this will hang the neovim process as `terminal_execute` will enter an endless loop as `got_int` will never be cleared causing `safe_vgetc` to always return `Ctrl_C`. A minimal example reproducing this bug: ```vim :autocmd TermEnter * call timer_start(500, {-> interrupt()}) :terminal :startinsert ``` To fix, we make sure `got_int` is cleared inside `terminal_execute` when it detects `Ctrl_C`. Closes #20726 Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* fix(terminal): handle C0 characters in OSC terminator (#30090)Gregory Anders2024-08-19
| | | | | | | | | | | | | | When a C0 character is present in an OSC terminator (i.e. after the ESC but before a \ (0x5c) or printable character), vterm executes the control character and resets the current string fragment. If the C0 character is the final byte in the sequence, the string fragment has a zero length. However, because the VT parser is still in the "escape" state, vterm attempts to subtract 1 from the string length (to account for the escape character). When the string fragment is empty, this causes an underflow in the unsigned size variable, resulting in a buffer overflow. The fix is simple: explicitly check if the string length is non-zero before subtracting.