aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
* | cmdheight=0: fix bugs #18961Shougo2022-06-30
| | | | | | | | | | | | | | | | | | | | | | | | Continue of #16251 Fix #18953 Fix #18960 Fix #18958 Fix #18955 Fix #18970 Fix #18983 Fix #18995 Fix #19112
* | feat(marks): restore viewport on jump #15831Javier Lopez2022-06-30
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ** Refactor Previously most functions used to "get" a mark returned a position, changed the line number and sometimes changed even the current buffer. Now functions return a {x}fmark_T making calling context aware whether the mark is in another buffer without arcane casting. A new function is provided for switching to the mark buffer and returning a flag style Enum to convey what happen in the movement. If the cursor changed, line, columns, if it changed buffer, etc. The function to get named mark was split into multiple functions. - mark_get() -> fmark_T - mark_get_global() -> xfmark_T - mark_get_local() -> fmark_T - mark_get_motion() -> fmark_T - mark_get_visual() -> fmark_T Functions that manage the changelist and jumplist were also modified to return mark types. - get_jumplist -> fmark_T - get_changelist -> fmark_T The refactor is also seen mainly on normal.c, where all the mark movement has been siphoned through one function nv_gomark, while the other functions handle getting the mark and setting their movement flags. To handle whether context marks should be left, etc. ** Mark View While doing the refactor the concept of a mark view was also implemented: The view of a mark currently implemented as the number of lines between the mark position on creation and the window topline. This allows for moving not only back to the position of a mark but having the window look similar to when the mark was defined. This is done by carrying and extra element in the fmark_T struct, which can be extended later to also restore horizontal shift. *** User space features 1. There's a new option, jumpoptions+=view enables the mark view restoring automatically when using the jumplist, changelist, alternate-file and mark motions. <C-O> <C-I> g; g, <C-^> '[mark] `[mark] ** Limitations - The view information is not saved in shada. - Calls to get_mark should copy the value in the pointer since we are using pos_to_mark() to wrap and provide a homogeneous interfaces. This was also a limitation in the previous state of things.
* refactor(uncrustify): change config to better align with style guide (#18803)dundargoc2022-06-30
| | | refactor(uncrustify): change config to better align with neovim style
* vim-patch:9.0.0011: reading beyond the end of the line with put command (#19166)zeertzjq2022-06-30
| | | | | Problem: Reading beyond the end of the line with put command. Solution: Adjust the end mark position. https://github.com/vim/vim/commit/d25f003342aca9889067f2e839963dfeccf1fe05
* feat(build): add_glob_target runs only on changed files #19070dundargoc2022-06-30
| | | | | | | | | | | | | The general idea is that add_glob_targets creates a "touch file", a dummy file that acts as a dependency in order to check which files are outdated since the last time the target was run. Remove RunUncrustify.cmake as it's no longer necessary. It was initially introduced to silence its noisy output. The per-file targets will suppress the noisy output from uncrustify, except for the very first run. Also remove DefCmdTarget.cmake since add_glob_target already incorporates its functionality.
* feat: stdpath('run'), /tmp/nvim.user/ #18993Justin M. Keyes2022-06-30
| | | | | | | | | | | | | | | | Problem: - Since c57f6b28d71d #8519, sockets are created in ~/.local/… but XDG spec says: "XDG_RUNTIME_DIR: Must be on the local filesystem", which implies that XDG_STATE_DIR is potentially non-local. - Not easy to inspect Nvim-created temp files (for debugging etc). Solution: - Store sockets in stdpath('run') ($XDG_RUNTIME_DIR). - Establish "/tmp/nvim.user/" as the tempdir root shared by all Nvims. - Make ok() actually useful. - Introduce assert_nolog(). closes #3517 closes #17093
* Merge pull request #19134 from dundargoc/refactor/conversionbfredl2022-06-30
|\ | | | | refactor: enable -Wconversion warning for fileio.c
| * refactor: enable -Wconversion warning for fileio.cDundar Goc2022-06-29
| | | | | | | | Work on https://github.com/neovim/neovim/issues/567
* | refactor(highlight)!: rename attributes to match Vim (#19159)zeertzjq2022-06-30
|/ | | | | | | | | Ref: https://github.com/vim/vim/commit/84f546363068e4ddfe14a8a2a2322bb8d3a25417 Rename: - `underlineline` to `underdouble` - `underdot` to `underdotted` - `underdash` to `underdashed` `underdouble` also now takes higher precedence than `undercurl`.
* vim-patch:9.0.0006: not all Visual Basic files are recognized (#19153)Christian Clason2022-06-29
| | | | | Problem: Not all Visual Basic files are recognized. Solution: Change detection of *.cls files. (Doug Kearns) https://github.com/vim/vim/commit/8b5901e2f9466eb6f38f5b251e871f609f65e252
* vim-patch:9.0.0005: hare files are not recognized (#19151)Christian Clason2022-06-29
| | | | | Problem: Hare files are not recognized. Solution: Add a filetype pattern. (Hugo Osvaldo Barrera, closes vim/vim#10630) https://github.com/vim/vim/commit/040674129f3382822eeb7b590380efa5228124a8
* vim-patch:8.2.4378: incsearch HL broken when calling searchcount in ↵zeertzjq2022-06-29
| | | | | | | | | 'tabLine' (#19147) Problem: Incsearch highlight broken when calling searchcount() in 'tabLine' function. (Mirko Palmer) Solution: Save and restore the incsearch state. (Christian Brabandt, closes vim/vim#9763, closes vim/vim#9633) https://github.com/vim/vim/commit/6dd7424c7e6ab81998c29ca3526c41b75cfde5a1
* vim-patch:9.0.0002: map functionality outside of map.c (#19150)zeertzjq2022-06-29
| | | | | Problem: Map functionality outside of map.c. Solution: Move f_hasmapto() to map.c. Rename a function. (closes vim/vim#10611) https://github.com/vim/vim/commit/c207fd2535717030d78f9b92839e5f2ac004cc78
* Merge pull request #19133 from famiu/feat/api/cmd_support_filterbfredl2022-06-29
|\ | | | | feat(api): make `nvim_parse_cmd` and `nvim_cmd` support :filter
| * feat(api): make `nvim_parse_cmd` and `nvim_cmd` support :filterFamiu Haque2022-06-28
| | | | | | | | | | | | Also fixes a memory leak in `parse_cmdline`. Closes #18954.
* | feat: update unicode tables #19135Justin M. Keyes2022-06-28
| |
* | refactor(aucmd): call define_autocmd() directly for default autocmdsbfredl2022-06-28
| |
* | refactor(map): simplify add_map paramsbfredl2022-06-28
| |
* | Merge #19120 build: rename build-related dirsJustin M. Keyes2022-06-28
|\ \
| * | build: move unicode/ to src/unicode/Justin M. Keyes2022-06-28
| | |
| * | build: rename build-related dirsJustin M. Keyes2022-06-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Dirs "config", "packaging", and "third-party" are all closely related but this is not obvious from the layout. This adds friction for new contributors. Solution: - rename config/ to cmake.config/ - rename test/config/ to test/cmakeconfig/ because it is used in Lua tests: require('test.cmakeconfig.paths'). - rename packaging/ to cmake.packaging/ - rename third-party/ to cmake.deps/ (parallel with .deps/)
* | | fix(coverity): redundant assert #19059Thomas Vigouroux2022-06-28
|/ / | | | | | | | | * fix(coverity/353303): redundant assert eap->line2 is an int32_t, it is always lower than INT_MAX. * fix(coverity/353302): redundant assert
* | Merge #19060 memory leaksJustin M. Keyes2022-06-28
|\ \ | |/ |/|
| * fix(coverity/348300): free memory when overiding sing attributeThomas Vigouroux2022-06-27
| | | | | | | | | | Nothing prevent the user from doing `:sign define abc culhl=Normal culhl=Normal` and thus this leads to an obvious memory leak.
| * fix(coverity/348313): don't exit too early in runtime_defaultThomas Vigouroux2022-06-24
| |
| * fix(coverity/352829): correctly free memory in f_callThomas Vigouroux2022-06-24
| | | | | | | | | | This function was not freeing allocated memory that it owns when calling functions from lua.
* | refactor: replace char_u #18429dundargoc2022-06-28
| | | | | | Work on https://github.com/neovim/neovim/issues/459
* | fix(inccommand): parse the command to check if it is previewableFamiu Haque2022-06-28
| | | | | | | | | | Free regprog if command isn't previewable Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* | refactor: enable -Wconversion warning for message.cDundar Goc2022-06-27
| | | | | | | | Work on https://github.com/neovim/neovim/issues/567
* | 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
* | | 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
| | |
* | | 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
| | | |
* | | | 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
| | |