aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* vim-patch:partial:8a3b805c6c9c (#19104)Christian Clason2022-06-27
| | | | | | | Update runtime files https://github.com/vim/vim/commit/8a3b805c6c9cae341d560df9c3567ebbe42a7404 skip builtin.txt (needs 8.2.4838) skip message.txt (whitespace changes)
* Merge pull request #19077 from dundargoc/refactor/conversionbfredl2022-06-27
|\ | | | | refactor: enable -Wconversion warning for ex_cmds.c
| * refactor: enable -Wconversion warning for ex_cmds.cDundar Goc2022-06-25
| | | | | | | | Work on https://github.com/neovim/neovim/issues/567
* | refactor(filetype): allow vim.filetype.match to accept buf and filename (#19114)Gregory Anders2022-06-27
| | | | | | | | | | | | | | This is necessary in cases where filetype detection acts recursively. For example, when matching files that end with .bak, the "root" of the filename is matched again against the same buffer (e.g. a buffer named "foo.c.bak" will be matched again with the filename "foo.c", using the same underlying buffer).
* | build: move man/ to src/man/ #19119Justin M. Keyes2022-06-27
| | | | | | | | | | | | | | | | Problem: man/ contains source files for manpage generation, it doesn't need to live at the project root. Solution: Move it to src/man/.
* | fix(api): change default value of 'pattern' in nvim_exec_autocmds (#19115)Gregory Anders2022-06-27
| | | | | | | | | | | | Omitting 'pattern' in nvim_exec_autocmds should be equivalent to omitting the 'fname' argument in :doautoall, which is equivalent to using an empty string as the pattern. Fixes regression introduced in #19091.
* | fix(api): nvim_parse_cmd check for ambiguous user command (#19116)zeertzjq2022-06-27
| |
* | test: use "python3" to avoid skipped test #19106Justin M. Keyes2022-06-26
| | | | | | | | | | | | | | | | Problem: The "calls executable in $PATH" is skipped on some CI jobs because "python" is not found. Solution: Use "python3" instead.
* | Merge pull request #18716 from zeertzjq/vim-8.2.5007zeertzjq2022-06-27
|\ \ | | | | | | vim-patch:8.2.{3484,5007,5123}: spell suggestion fixes
| * | fix(spell): make setting 'encoding' clear word listzeertzjq2022-06-27
| | |
| * | vim-patch:8.2.5123: using invalid index when looking for spell suggestionszeertzjq2022-06-27
| | | | | | | | | | | | | | | | | | Problem: Using invalid index when looking for spell suggestions. Solution: Do not decrement the index when it is zero. https://github.com/vim/vim/commit/156d3911952d73b03d7420dc3540215247db0fe8
| * | vim-patch:8.2.5007: spell suggestion may use uninitialized memoryzeertzjq2022-06-27
| | | | | | | | | | | | | | | | | | Problem: Spell suggestion may use uninitialized memory. (Zdenek Dohnal) Solution: Avoid going over the end of the word. https://github.com/vim/vim/commit/6d24b4ff69913270ce1e5267dd6bd8454f75e2b9
| * | 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
| | |
* | | refactor(filetype)!: allow vim.filetype.match to use different strategies ↵Gregory Anders2022-06-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#18895) This enables vim.filetype.match to match based on a buffer (most accurate) or simply a filename or file contents, which are less accurate but may still be useful for some scenarios. When matching based on a buffer, the buffer's name and contents are both used to do full filetype matching. When using a filename, if the file exists the file is loaded into a buffer and full filetype detection is performed. If the file does not exist then filetype matching is only performed against the filename itself. Content-based matching does the equivalent of scripts.vim, and matches solely based on file contents without any information from the name of the file itself (e.g. for shebangs). BREAKING CHANGE: use `vim.filetype.match({buf = bufnr})` instead of `vim.filetype.match(name, bufnr)`
* | | docs(release): suggest "xattr" for macos release #19100Carlo Cabrera2022-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.
* | | vim-patch:e1dc76fbf333 (#19092)Christian Clason2022-06-25
| | | | | | | | | | | | Update runtime files https://github.com/vim/vim/commit/e1dc76fbf333243ecfdfc3c0a81ea9984913b4f5
* | | Merge pull request #19090 from bfredl/luaprgbfredl2022-06-25
|\ \ \ | |/ / |/| | fix(build): don't disable byte precompilation on debug builds
| * | fix(build): don't disable byte precompilation on debug buildsbfredl2022-06-25
|/ / | | | | | | | | This special casing is redundant since long, as you can disable the binary cache regardless of build type with the --luamod-dev flag
* | Merge pull request #16271 from 3N4N/fix-15913Christian Clason2022-06-25
|\ \ | |/ |/| fix: make_filter_cmd for powershell as shell
| * 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
* fix(build): strip trailing newline from variable (#19084)Christian Clason2022-06-25
| | | | | | | | Problem: #19029 added a new fallback that sets `$MACOSX_DEPLOYMENT_TARGET` to the local macOS version via `sw_vers`. However, the output included a newline, which broke the generated Ninja build script. Solution: use `OUTPUT_STRIP_TRAILING_WHITESPACE` for `execute_process`.
* 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 #19029 from carlocab/macos-universalChristian Clason2022-06-25
|\ | | | | ci: build universal release on macOS
| * ci(release): build a universal binary on macOSCarlo Cabrera2022-06-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After some tweaks to our dep builds, we can now build a universal binary for macOS by using `CMAKE_OSX_ARCHITECTURES`. So, let's do that. This requires a number of additional changes: 1. We need to build on macOS 11, since earlier versions do not support building universal (M1 + Intel) binaries. 2. We need to provision a universal `libintl`. The linker will look for an ARM64 version of this library when linking the `nvim` binary. While we're here: 1. Link statically to `libintl`. This allows to to avoid having to do any install name rewriting or codesigning to package Neovim. 2. Bump the `MACOSX_DEPLOYMENT_TARGET` to `11`. We're already using a `libintl` built by Homebrew (through the pre-installed version of `gettext`), and that is built for macOS 11. In order to ensure we link to `libintl.a` instead of `libintl.dylib`, we have to make sure that CMake can't find the latter. This ideally should be a matter of doing `brew unlink gettext`. However, CMake is too adept at finding things that Homebrew has installed (even when not linked), so we have to do a bit more than that. This appears in the additional step ensuring static linkage to `libintl`. We end up breaking some Homebrew-installed software in the process, and some of these software is called during our build (e.g. curl, git, wget). To avoid any adverse effects, let's just uninstall them.
| * build(deps): support universal builds on macOSCarlo Cabrera2022-06-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | CMake can handle building universal binaries on macOS using the `CMAKE_OSX_ARCHITECTURES` variable. Let's pass this variable to the relevant dep builds. We use the `LIST_SEPARATOR` argument to prevent the shell from interpreting the `;` that CMake uses as a list separator. For dependencies that don't build using CMake, we only need to make sure that the compiler is invoked with the correct `-arch` flags. The compiler does the rest. The only exception to this is the LuaJIT build, which we handle separately as a special case.
| * build(luajit): support universal builds on macOSCarlo Cabrera2022-06-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To build universal binaries on macOS, one typically only needs to pass multiple `-arch` flags to `clang`. Unfortunately, this strategy causes LuaJIT builds to fail. To work around this, we build LuaJIT for each requested architecture individually first and then use `lipo` to package each architecture slice into a universal binary. To be able to do this on an Intel macOS host or an M1 macOS host without a Rosetta installation, we need some special flags in order to tell LuaJIT that it is cross-compiling for a different target. See [1] for details. [1] https://luajit.org/install.html#cross
* | build(gen_vimdoc): remove needless list creation and unused variable (#19079)Axis2022-06-25
| | | | | | build(gen_vimdoc): remove needless list creation
* | 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.
* | | fix(filetype.lua): always return a string in getlines function (#19080)Hazel Weakly2022-06-24
| |/ |/| | | | | This re-introduces the fix that the filetype.lua refactor inadvertently reverted. The fix ensures that in the case when end_lnum is omitted, a string is always returned.
* | Merge pull request #19071 from bfredl/minimapbfredl2022-06-24
|\ \ | | | | | | perf(map): some optimizations when setting mappings
| * | 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:a57b553b4328 (#19076)Christian Clason2022-06-24
|/ / | | | | | | Update runtime files https://github.com/vim/vim/commit/a57b553b432855667c9f26edfad95ccfdd24a6b7
* | Merge pull request #19072 from zeertzjq/vim-8.2.4628zeertzjq2022-06-24
|\ \ | | | | | | vim-patch:8.2.{4628,4895,4977,5146,5154}
| * | 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(tests): remove misleading $TEST_PATH segment #19050Justin M. Keyes2022-06-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: RunTests.cmake adds $TEST_PATH to $TMPDIR with the implication that it gives more isolation. But this is misleading because $TEST_PATH is only defined once. Full test runs use the same $TMPDIR for all tests. This was likely added with the intention of invoking RunTests.cmake once-per-testfile from a wrapper than does the isolation/orchestration. But even so, Nvim's vim_maketempdir() / vim_mktempdir() _already_ creates a unique tempdir per session. Solution: Don't append $TEST_PATH to $TMPDIR. Avoids confusion and makes the path shorter.
* | vim-patch:8cc5b559f700 (#19066)Christian Clason2022-06-23
| | | | | | | | Update runtime files https://github.com/vim/vim/commit/8cc5b559f70041361612b8a6a87922503b33baa6
* | fix(api): check for inclusive buffer line index out of bounds correctly (#19056)zeertzjq2022-06-23
| |