aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
* | | vim-patch:8.2.3484: crash when going through spell suggestionszeertzjq2022-06-27
| | | | | | | | | | | | | | | | | | | | | Problem: Crash when going through spell suggestions. Solution: Limit the text length for finding suggestions to the original length. Do not update buffers when exiting. (closes vim/vim#8965) https://github.com/vim/vim/commit/e275ba4fc994474155fbafe8b87a6d3b477456ba
* | | Merge pull request #19091 from clason/do-aucmd-patsChristian Clason2022-06-26
|\ \ \ | | | | | | | | feat(api): support pattern array for exec_autocmds
| * | | refactor(api): use FOREACH_ITEM macro in autocmdChristian Clason2022-06-26
| | | |
| * | | feat(api): support pattern array for exec_autocmdsChristian Clason2022-06-26
| | | |
* | | | build: guard free_locales with HAVE_WORKING_LIBINTL #19095zeertzjq2022-06-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With 4c7462fdb313a64d6903809ece2d8d564c0ea420, when `libintl` is turned off via `-DENABLE_LIBINTL=OFF`, Neovim does not compile in Debug mode with the following error message: ``` ... [201/331] Building C object src/nvim/CMakeFiles/nvim.dir/eval.c.o FAILED: src/nvim/CMakeFiles/nvim.dir/eval.c.o /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -DEXITFREE -DINCLUDE_GENERATED_DECLARATIONS -DMIN_LOG_LEVEL=1 -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -Dnvim_EXPORTS -I/Users/hat/Projects/neovim/build/config -I/Users/hat/Projects/neovim/src -I/Users/hat/Projects/neovim/build/src/nvim/auto -I/Users/hat/Projects/neovim/build/include -I/Users/hat/Projects/neovim/.deps/usr/include/luajit-2.1 -isystem /Users/hat/Projects/neovim/.deps/usr/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -DNVIM_TS_HAS_SET_ALLOCATOR -g -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -Wno-conversion -MD -MT src/nvim/CMakeFiles/nvim.dir/eval.c.o -MF src/nvim/CMakeFiles/nvim.dir/eval.c.o.d -o src/nvim/CMakeFiles/nvim.dir/eval.c.o -c /Users/hat/Projects/neovim/src/nvim/eval.c /Users/hat/Projects/neovim/src/nvim/eval.c:473:3: error: implicit declaration of function 'free_locales' is invalid in C99 [-Werror,-Wimplicit-function-declaration] free_locales(); ^ /Users/hat/Projects/neovim/src/nvim/eval.c:473:3: note: did you mean 'free_titles'? /Users/hat/Projects/neovim/build/include/buffer.h.generated.h:58:16: note: 'free_titles' declared here DLLEXPORT void free_titles(void); ^ 1 error generated. [212/331] Building C object src/nvim/CMakeFiles/nvim.dir/eval/funcs.c.o ninja: build stopped: subcommand failed. make: *** [nvim] Error 1 ``` The previous commit, b1b58020094a2ffa85e40194b8beb2945396610a, to 4c7462f does not have this issue. As you can see in the following, the issue occurs only in Debug mode with `libintl` turned off: ```bash # No issue git checkout b1b5802 # The following Debug build works make distclean; make SDKROOT=$(xcrun --sdk macosx --show-sdk-path) CMAKE_EXTRA_FLAGS="-DENABLE_LIBINTL=OFF" # The following Release build works make distclean; make CMAKE_BUILD_TYPE=Release SDKROOT=$(xcrun --sdk macosx --show-sdk-path) CMAKE_EXTRA_FLAGS="-DENABLE_LIBINTL=OFF" # Compile error when in Debug and libintl turned off git checkout 4c7462f # The following Debug build does not work make distclean; make SDKROOT=$(xcrun --sdk macosx --show-sdk-path) CMAKE_EXTRA_FLAGS="-DENABLE_LIBINTL=OFF" # The following Debug build works make distclean; make SDKROOT=$(xcrun --sdk macosx --show-sdk-path) # The following Release build works make distclean; make CMAKE_BUILD_TYPE=Release SDKROOT=$(xcrun --sdk macosx --show-sdk-path) CMAKE_EXTRA_FLAGS="-DENABLE_LIBINTL=OFF" ``` I noticed this because I turn `libintl` off when compiling `libnvim` for VimR. Fix #19093
* | | | revert: "oldtests: use expand() to fix pathsep" (#19073)zeertzjq2022-06-26
|/ / / | | | | | | | | | | | | This reverts commit e3687165a74ba2f3234cd6acc156ec12f85a5f3a. No longer needed after #10679.
* | | refactor(tests): introduce testprg()Justin M. Keyes2022-06-25
| | | | | | | | | | | | | | | | | | Also: - Add a describe('shell :!') section to system_spec. - Make the test for #16271 work on systems without powershell.
* | | fix: make_filter_cmd for :! powershell #15913Enan Ajmain2022-06-25
|/ / | | | | | | | | | | | | | | | | | | | | | | | | Problem: Nvim fails to create tempfile "…/nvim6UJx04/7" when 'shell' is set to pwsh (PowerShell Core). This breaks filtered shell commands ":{range}!". With shell set to cmd, it works. Solution: PowerShell doesn't use "<" for stdin redirection. Instead, use "-RedirectStandardInput". Closes #15913
* | vim-patch:8.2.5022: 'completefunc'/'omnifunc' error does not end completion ↵zeertzjq2022-06-25
| | | | | | | | | | | | | | | | (#19083) Problem: 'completefunc'/'omnifunc' error does not end completion. Solution: Check if there was an error or exception. (closes vim/vim#10486, closes vim/vim#4218) https://github.com/vim/vim/commit/9bcb9ca9c7dd1632385dc3351b5e019739368658
* | Merge pull request #19041 from lewis6991/globallocalbfredl2022-06-25
|\ \ | | | | | | fix(api): nvim_set_option_value for global-local options
| * | fix(api): nvim_set_option_value for global-local optionsLewis Russell2022-06-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | global-local window options need to be handled specially. When `win` is given but `scope` is not, then we want to set the local version of the option but not the global one, therefore we need to force `scope='local'`. Note this does not apply to window-local only options (e.g. 'number') Example: nvim_set_option_value('scrolloff', 10, {}) -- global-local window option; set global value nvim_set_option_value('scrolloff', 20, {win=0}) -- global-local window option; set local value nvim_set_option_value('number', true, {}) -- local window option is now equivalent to: nvim_set_option_value('scrolloff', 10, {}) nvim_set_option_value('scrolloff', 20, {win=0, scope='local'}) -- changed from before nvim_set_option_value('number', true, {win=0}) -- unchanged from before Only the global-local option with a `win` provided gets forced to local scope.
* | | refactor(map): statically initialize maphash arraybfredl2022-06-24
| | |
* | | refactor(map): simplify free_all_mem handlingbfredl2022-06-24
| | |
* | | perf(map): avoid extraneous heap allocations when setting mappingsbfredl2022-06-24
| | | | | | | | | | | | | | | | | | - don't immediately vim_strsave and then xfree a heap buffer. - allow replace_termcodes to take in a buffer instead of allocating it - grug! memory allocation bad!
* | | perf(map): visit only one hash bucket instead of all, like an actual hash tablebfredl2022-06-24
| |/ |/|
* | vim-patch:8.2.5146: memory leak when substitute expression nestszeertzjq2022-06-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Memory leak when substitute expression nests. Solution: Use an array of expression results. https://github.com/vim/vim/commit/44ddf19ec0ff59c969658ec7d9ed42070c59c51b Cherry-pick a comment change from patch 8.2.5057. N/A patches for version.c: vim-patch:8.2.5154: still mentioning version8, some cosmetic issues Problem: Still mentioning version8, some cosmetic issues. Solution: Prefer mentioning version9, cosmetic improvements. https://github.com/vim/vim/commit/abd56da30bae4a5c6c20b9363ccae12f7b126026
* | vim-patch:8.2.4977: memory access error when substitute expression changes ↵zeertzjq2022-06-24
| | | | | | | | | | | | | | | | | | | | window Problem: Memory access error when substitute expression changes window. Solution: Disallow changing window in substitute expression. https://github.com/vim/vim/commit/e2bd8600b873d2cd1f9d667c28cba8b1dba18839 "textwinlock" was renamed back to "textlock" in patch 8.2.5029.
* | vim-patch:8.2.4895: buffer overflow with invalid command with composing charszeertzjq2022-06-24
| | | | | | | | | | | | Problem: Buffer overflow with invalid command with composing chars. Solution: Check that the whole character fits in the buffer. https://github.com/vim/vim/commit/d88934406c5375d88f8f1b65331c9f0cab68cc6c
* | vim-patch:8.2.4628: not enough testing for 2/3 letter substitute commandszeertzjq2022-06-24
| | | | | | | | | | | | Problem: Not enough testing for 2/3 letter substitute commands. Solution: Add more tests. (Yegappan Lakshmanan, closes vim/vim#10019) https://github.com/vim/vim/commit/5e877baf87530d5c4fe4da2c5a6269cf19526c27
* | fix(api): check for inclusive buffer line index out of bounds correctly (#19056)zeertzjq2022-06-23
| |
* | refactor: move some mapping-related code to a separate file (#19061)zeertzjq2022-06-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This marks the following Vim patches as ported: vim-patch:8.1.1785: map functionality mixed with character input Problem: Map functionality mixed with character input. Solution: Move the map functionality to a separate file. (Yegappan Lakshmanan, closes vim/vim#4740) Graduate the +localmap feature. https://github.com/vim/vim/commit/b66bab381c8ba71fd6e92327d1d34c6f8a65f2a7 vim-patch:8.2.3643: header for source file is outdated Problem: Header for source file is outdated. Solution: Make the header more accurate. (closes vim/vim#9186) https://github.com/vim/vim/commit/a3f83feb63eae5464a620ae793c002eb45f7a838 Also cherry-pick a change for <unique> mappings from patch 8.2.0807. Rename map_clear_mode() to do_mapclear().
* | Merge pull request #19058 from bfredl/minioptbfredl2022-06-23
|\ \ | | | | | | perf(highlight): use binary search to lookup RGB color names
| * | perf(highlight): use binary search to lookup RGB color namesbfredl2022-06-23
| |/
* | vim-patch:8.2.5152: search() gets stuck with "c" and skip evaluates to true ↵zeertzjq2022-06-23
| | | | | | | | | | | | | | (#19064) Problem: search() gets stuck with "c" and skip evaluates to true. Solution: Reset the SEARCH_START option. (closes vim/vim#10608) https://github.com/vim/vim/commit/180246cfd1a5842c538fa8a4a0b520f1d95c90c7
* | Merge pull request #19020 from echasnovski/screenchar-floatbfredl2022-06-23
|\ \ | | | | | | fix(float): make `screen*()` functions respect floating windows
| * | fix(float): make `screen*()` functions respect floating windowsEvgeni Chasnovski2022-06-23
| | | | | | | | | | | | Resolves #19013.
* | | vim-patch:8.2.2068: transparent syntax item uses start/end of containing ↵zeertzjq2022-06-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | region (#19055) Problem: Transparent syntax item uses start/end of containing region. Solution: Do not change the startpos and endpos of a transparent region to that of its containing region. (Adrian Ghizaru, closes vim/vim#7349, closes vim/vim#7391) https://github.com/vim/vim/commit/b46f57e87b3706a8c4b97d8e03f7853a7938b061
* | | vim-patch:8.2.5151: reading beyond the end of the line with lisp indentingzeertzjq2022-06-23
| | | | | | | | | | | | | | | | | | Problem: Reading beyond the end of the line with lisp indenting. Solution: Avoid going over the NUL at the end of the line. https://github.com/vim/vim/commit/8eba2bd291b347e3008aa9e565652d51ad638cfa
* | | vim-patch:8.2.5150: read past the end of the first line with ":0;'{"zeertzjq2022-06-23
| | | | | | | | | | | | | | | | | | Problem: Read past the end of the first line with ":0;'{". Solution: When on line zero check the column is valid for line one. https://github.com/vim/vim/commit/f7c7c3fad6d2135d558f3b36d0d1a943118aeb5e
* | | fix(input): use correct grid when restoring cursor for <expr> mapping (#19047)zeertzjq2022-06-23
| | |
* | | fix(api): check error after getting win/buf handle (#19052)Gregory Anders2022-06-22
| |/ |/|
* | Merge pull request #19039 from bfredl/multicolorbfredl2022-06-22
|\ \ | | | | | | perf: get rid of unnecessary allocations in highlight groups
| * | perf(ui): remove spurious allocations from mode_style_array()bfredl2022-06-21
| | |
| * | perf(highlight): allocate permanent names in an arena for fun and cache localitybfredl2022-06-21
| | |
| * | refactor: remove atrocious HL_TABLE()[idx] syntax before I poke my eyes outbfredl2022-06-21
| | |
| * | refactor(highlight): get rid of syn_unadd_group()bfredl2022-06-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is a sham. if the user does hi ExistingGroup guifg=AliceBlue invalidkey=foobar the "guifg" part will still be executed. No need to micro-manage the same case where ANewGroup is added instead.
| * | perf(highlight): don't allocate duplicates for color namesbfredl2022-06-21
| | |
| * | perf(highlight): get rid of local memory allocations for "{key}={arg}"bfredl2022-06-21
| | |
* | | vim-patch:8.2.5132: :mkview test doesn't test much (#19045)zeertzjq2022-06-22
| | | | | | | | | | | | | | | Problem: :mkview test doesn't test much. Solution: Save the view with the folds closed. (James McCoy, closes vim/vim#10596) https://github.com/vim/vim/commit/c829faa8211df52997c0b9ee49cdea0c8786b177
* | | refactor(option): DRY get/set option value #19038Lewis Russell2022-06-21
| | | | | | | | | | | | | | | | | | | | | | | | The main motivation for this is for the buf and win cases which need to set up and restore context, and it's what specifically makes the semantics of options nuanced, and thus this should not be repeated more than once. - nvim_get/set_option_value now share argument validation.
* | | build(cmake): use glob_wrapper instead of file(GLOB in main CMakeListsDundar Goc2022-06-21
|/ / | | | | | | | | | | | | This will allow cmake to check if any directories needs re-globbing, in other words, if any new file has been added since last time cmake was run. This will (allegedly) make the configure stage slower but I have not noticed any difference so I believe this is well worth it.
* | Merge pull request #18743 from gpanders/bowooptvalueGregory Anders2022-06-20
|\ \ | | | | | | Add "buf" and "win" to nvim_get_option_value and use them in vim.bo and vim.wo
| * | feat(api): add "buf" and "win" to nvim_get_option_valueGregory Anders2022-06-20
| | | | | | | | | | | | These mirror their counterparts in nvim_set_option_value.
* | | Merge pull request #19030 from zeertzjq/vim-8.2.5138zeertzjq2022-06-21
|\ \ \ | | | | | | | | vim-patch:8.2.{5107,5138}: various small issues
| * | | vim-patch:8.2.5138: various small issueszeertzjq2022-06-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Various small issues. Solution: Various small improvments. https://github.com/vim/vim/commit/8088ae95bbed2085c5fb196850c4e4b8df55c989 N/A patches for version.c: vim-patch:8.2.5107: some callers of rettv_list_alloc() check for not OK Problem: Some callers of rettv_list_alloc() check for not OK. (Christ van Willegen) Solution: Use "==" instead of "!=" when checking the return value. https://github.com/vim/vim/commit/93a1096fe48e12095544924adb267e3b8a16b221
* | | | perf(ui): reduce allocation overhead when encoding "redraw" eventsbfredl2022-06-20
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note for external UIs: Nvim can now emit multiple "redraw" event batches before a final "flush" event is received. To retain existing behavior, clients should make sure to update visible state at an explicit "flush" event, not just the end of a "redraw" batch of event. * Get rid of copy_object() blizzard in the auto-generated ui_event layer * Special case "grid_line" by encoding screen state directly to msgpack events with no intermediate API events. * Get rid of the arcane notion of referring to the screen as the "shell" * Array and Dictionary are kvec_t:s, so define them as such. * Allow kvec_t:s, such as Arrays and Dictionaries, to be allocated with a predetermined size within an arena. * Eliminate redundant capacity checking when filling such kvec_t:s with values.
* | | Merge #19015 delete cmake codeJustin M. Keyes2022-06-19
|\ \ \
| * | | build(cmake): simplify def_cmd_target functionDundar Goc2022-06-19
| | | | | | | | | | | | | | | | | | | | | | | | Instead of appending to a command output, append to an existing target instead. The primary benefit is intermediary ...-cmd targets aren't needed, we can instead append commands to the relevant target directly.
* | | | fix(decorations): nvim_buf_set_extmark breaks conceal #19010ii142022-06-19
|/ / / | | | | | | | | | | | | | | | Closes #19007 Co-authored-by: bfredl <bjorn.linse@gmail.com> Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
* | / fix(tui): piping nodejs to nvim breaks input handling #18932Kevin Sicong Jiang2022-06-19
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Piping NodeJS output into Neovim makes the editor unusable. This happens because NodeJS changes the tty state on exit after Nvim calls uv_tty_set_mode(). (May not always happen due to race condition.) This should have been fixed by 4ba5b4a86461 #13084. But some commands and functions (:sleep, system(), …) call ui_flush() internally, in particular the first tui_mode_change() is called before the end of startup. Steps to reproduce: 1. node -e "setTimeout(()=>{console.log('test')}, 1000)" | nvim -u NORC +"sleep 500m" - 2. The cursor key letters just overwrite the editor screen, and CTRL+C exits. Solution: Skip pending_mode_update during startup. Note: Delaying ui_flush() entirely could be a more general solution (emit a new UI event on VimEnter?). But "remote/coprocess TUI" #18375 could make all of this moot anyway. Fixes #18470