aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
* build: use libuv config file (#22209)ii142023-02-16
| | | | | | | | | Libuv's recent changes in their pc file breaks cmake; they are using -l:libuv.a for the linker, and it seems cmake can't resolve that. Prefer using their cmake config file instead instead, and use the find module as a fall-back in case it fails. Closes https://github.com/neovim/neovim/issues/22271.
* build: use custom command to create single versiondef (#22290)Gregory Anders2023-02-16
| | | | | | | | When using a multi config generator, CMake generates an output file for each configuration when using file(GENERATE). When the contents of the file for each configuration are different, CMake fails. Instead, create separate files for each configuration and add a build time step to copy the configuration specific file to the generic path "auto/versiondef.h" which is included at build time.
* refactor(drawline.c): leadcol/trailcolLewis Russell2023-02-16
|
* fix(api): allow empty Lua table for nested dicts #22268Justin M. Keyes2023-02-16
| | | | | | | | | | | | | | | Problem: The Lua-API bridge allows Dict params to be empty Lua (list) tables at the function-signature level. But not for _nested_ Dicts, because they are not modeled: https://github.com/neovim/neovim/blob/fae754073289566051433fae74ec65783f9e7a6a/src/nvim/api/keysets.lua#L184 Some API functions like nvim_cmd check for kObjectTypeDictionary and don't handle the case of empty Lua tables (treated as "Array"). Solution: Introduce VALIDATE_T_DICT and use it in places where kObjectTypeDictionary was being checked directly. fixes #21005
* feat: $NVIM_APPNAME #22128Ghjuvan Lacambre2023-02-16
| | | | | | | | | | | | | | | | | | | | This commit implements the ability to control all of the XDG paths Neovim should use. This is done by setting an environment variable named NVIM_APPNAME. For example, setting $NVIM_APPNAME makes Neovim look for its configuration directory in $XDG_CONFIG_HOME/$NVIM_APPNAME instead of $XDG_CONFIG_HOME/nvim. If NVIM_APPNAME is not set or is an empty string, "nvim" will be used as default. The usecase for this feature is to enable an easy way to switch from configuration to configuration. One might argue that the various $XDG environment variables can already be used for this usecase. However, setting $XDG environment variables also affects tools spawned by Neovim. For example, while setting $XDG_CONFIG_HOME will enable Neovim to use a different configuration directory, it will also prevent Git from finding its "default" configuration. Closes https://github.com/neovim/neovim/issues/21691
* vim-patch:8.2.0154: reallocating the list of scripts is inefficientzeertzjq2023-02-16
| | | | | | | | | | | Problem: Reallocating the list of scripts is inefficient. Solution: Instead of using a growarray of scriptitem_T, store pointers and allocate each scriptitem_T separately. Also avoids that the growarray pointers change when sourcing a new script. https://github.com/vim/vim/commit/21b9e9773d64de40994f8762173bdd8befa6acf7 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.0114: info about sourced scripts is scatteredzeertzjq2023-02-16
| | | | | | | | | | Problem: Info about sourced scripts is scattered. Solution: Use scriptitem_T for info about a script, including s: variables. Drop ga_scripts. https://github.com/vim/vim/commit/7ebcba61b20d25d23109fff73d0346ad44ba1b3b Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:9.0.1312: Cursor position wrong when splitting window in insert modezeertzjq2023-02-16
| | | | | | | | | | Problem: Cursor position wrong when splitting window in insert mode. Solution: Pass the actual mode to win_fix_cursor(). (Luuk van Baal, closes vim/vim#11999, https://github.com/vim/vim/commit/bc3dc298b37820a8212e7d839e882e07d6cc98c8 Co-authored-by: Luuk van Baal <luukvbaal@gmail.com>
* vim-patch:9.0.1310: 'splitkeep' test has failureszeertzjq2023-02-16
| | | | | | | | | Problem: 'splitkeep' test has failures. Solution: Adjust expected cursor line position. https://github.com/vim/vim/commit/fdbd14e89207dca95549f298ee468793da852086 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:9.0.1309: scrolling two lines with even line count and 'scrolloff' setzeertzjq2023-02-16
| | | | | | | | | | | Problem: Scrolling two lines with even line count and 'scrolloff' set. Solution: Adjust how the topline is computed. (closes vim/vim#10545) https://github.com/vim/vim/commit/1d6539cf36a7b6d1afe76fb6316fe662f543bf60 Cherry-pick test_scroll_opt.vim changes from patch 8.2.1432. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* ci: add GCC Release testing (#22274)dundargoc2023-02-16
| | | | | | | | ci: add GCC release testing We currently have no release testing, so it's good to check for any unwanted behavior on release builds as well. Prefer GCC over clang, as GCC release builds seem to create more warnings on release compared to debug.
* Merge pull request #22056 from lewis6991/refactor/fileio_moreLewis Russell2023-02-15
|\ | | | | refactor `fileio.c`
| * refactor(fileio.c): normalize ifdefsLewis Russell2023-02-01
| | | | | | | | | | As well as improving readbability, this also avoids all Treesitter parsing errors which cannot handle elaborate use of the preprocessor.
| * refactor(fileio.c): remove HAVE_ACL ifdefsLewis Russell2023-02-01
| |
| * refactor(fileio.c): factor out backup creationLewis Russell2023-01-31
| |
| * refactor(fileio.c): make unreadable expression readableLewis Russell2023-01-31
| |
| * refactor(fileio.c): factor out file info calcLewis Russell2023-01-31
| |
| * refactor(fileio.c): factor out buf_write post autocmdsLewis Russell2023-01-31
| |
| * refactor(fileio.c): do not use macros for error handlingLewis Russell2023-01-31
| |
| * refactor(fileio.c): reduce scope of localsLewis Russell2023-01-31
| |
| * refactor(fileio.c): more boolsLewis Russell2023-01-31
| |
| * refactor(fileio.c): factor out autocmd handling from buf_write()Lewis Russell2023-01-31
| |
| * refactor(fileio.c): remove HAS_BW_FLAGSLewis Russell2023-01-31
| |
| * refactor(fileio.c): refactor buf_write_bytes (2)Lewis Russell2023-01-31
| |
| * refactor(fileio.c): refactor buf_write_bytesLewis Russell2023-01-31
| |
| * refactor(fileio.c): refactor vim_rename()Lewis Russell2023-01-31
| |
| * refactor(fileio.c): refactor match_file_path()Lewis Russell2023-01-31
| |
* | fix(tui): set taskbar, icon in Windows #22270Enan Ajmain2023-02-15
| | | | | | | | | | | | | | | | Problem: After TUI refactor commit, code for setting Windows taskbar icon wasn't being executed because of a backdated conditional. Solution: Update the conditional to take TUI refactor into account. Ref: https://github.com/neovim/neovim/pull/20634#discussion_r1088993820
* | fix(win_update): don't use unintialized memory in edge case (#22266)zeertzjq2023-02-15
| | | | | | | | | | | | | | This fixes two clang warnings. Using an unintialized "cursorline_fi" without assigning to it is not something that should normally happen, and in case it happens it will likely cause another redraw, but still don't use unintialized memory.
* | revert: "build: remove ENABLE_COMPILER_SUGGESTIONS option" (#22265)dundargoc2023-02-15
| | | | | | | | | | This reverts commit 1d6bb0892b58e5a4183e74c0fbd2dc20204e33a4. See: https://github.com/neovim/neovim/pull/22249#issuecomment-1430548550
* | Merge #22214 move init_default_autocmds to luaJustin M. Keyes2023-02-14
|\ \
| * | refactor: move init_default_autocmds to luaglacambre2023-02-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | The original motivation for this change came from developping https://github.com/neovim/neovim/pull/22159, which will require adding more autocommand creation to Neovim's startup sequence. This change requires lightly editing a test that expected no autocommand to have been created from lua.
| * | fix(helpers): restore channel id after a call to WITH_SCRIPT_CONTEXTglacambre2023-02-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In https://github.com/neovim/neovim/pull/22214, init_default_autocmds has been turned into a lua function call to nvim_create_augroup and nvim_create_autocmd. This introduced a strange regression: a test in vim_spec.lua started failing with its last_set_chan value switching from 0 to -9223372036854775808. It turns out that -9223372036854775808 is the value of LUA_INTERNAL_CALL and would be inherited as last_set_chan by options set from the command line due to the WITH_SCRIPT_CONTEXT macro not restoring the channel id (WITH_SCRIPT_CONTEXT is used by nvim_create_augroup).
* | | refactor(api): consistent VALIDATE messages #22262Justin M. Keyes2023-02-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Validation messages are not consistently formatted. - Parameter names sometimes are NOT quoted. - Descriptive names (non-parameters) sometimes ARE quoted. Solution: Always quote the `name` value passed to a VALIDATE macro _unless_ the value has whitespace.
* | | fix: uv_tty_set_mode failed in Windows #22264Enan Ajmain2023-02-14
| | | | | | | | | | | | | | | | | | | | | | | | Problem: uv_tty_set_mode on stdout in Windows exits with error. Cause: Windows cannot set the properties of the output of a tty. Solution: Remove call to uv_tty_set_mode. Ref: #21445 Ref: https://github.com/libuv/libuv/commit/88634c1405097c19582e870d278dd0e29dc55455#r100598822
* | | Merge pull request #11756 from bfredl/crashfixbfredl2023-02-14
|\ \ \ | | | | | | | | custom statusline crash containing unprintable unicode
| * | | fix(status): handle unprintable chars in the statuslineBjörn Linse2023-02-14
| | | |
* | | | Merge pull request #22113 from luukvbaal/nrwidthLewis Russell2023-02-14
|\ \ \ \ | | | | | | | | | | fix(column): no longer reset nrwidth_line_count for 'statuscolumn'
| * | | | refactor(column): remove unused build_statuscol_str() argumentsLuuk van Baal2023-02-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: `build_statuscol_str()` still has arguments that were necessary for building a status column string in `number_width()`, which was abandoned in #22094. Solution: Remove unused arguments.
| * | | | fix(column): no longer reset nrwidth_line_count for 'statuscolumn'Luuk van Baal2023-02-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: We still explicitly reset `nrwidth_line_count` when changing `'number'` or `'relativenumber'` but this is no longer needed since the introduction of a `statuscol_line_count`. Solution: Remove reset of `nrwidth_line_count`. Resolve https://github.com/neovim/neovim/pull/22094#issuecomment-1416168926.
* | | | | Merge pull request #22108 from luukvbaal/statuscolumnLewis Russell2023-02-14
|\ \ \ \ \ | | | | | | | | | | | | perf(column): only build fold/sign column when present in 'statuscolumn'
| * | | | | refactor(statusline): move statusline defs to statusline_defs.hLuuk van Baal2023-02-04
| | | | | |
| * | | | | perf(column): only build fold/sign column when present in 'statuscolumn'Luuk van Baal2023-02-04
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: The fold and sign column is built and stored regardless of whether the corresponding item is present in 'statuscolumn'. Solution: Since the 'statuscolumn' parses itself, we can defer building the columns until the corresponding item is actually encountered.
* | | | | refactor(api): VALIDATE macros #22256Justin M. Keyes2023-02-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - VALIDATE() takes a format string - deduplicate check_string_array - VALIDATE_RANGE - validate UI args
* | | | | refactor(api): VALIDATE macros #22187Justin M. Keyes2023-02-14
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: - API validation involves too much boilerplate. - API validation errors are not consistently worded. Solution: Introduce some macros. Currently these are clumsy, but they at least help with consistency and avoid some nesting.
* | | | fix(folds): cursorline highlight is not always applied on closed folds (#22242)luukvbaal2023-02-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: The cursorline highlight logic checks for `w_cursor.lnum` which may be different from the line number passed to `win_line()` even when the cursor is actually on that line. Solution: Update cursor line highlight logic to check for the line number of the start of a closed fold if necessary.
* | | | vim-patch:9.0.1307: setting 'formatoptions' with :let doesn't check for ↵zeertzjq2023-02-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | errors (#22252) Problem: Setting 'formatoptions' with :let doesn't check for errors. Solution: Pass "errbuf" to set_string_option(). (Yegappan Lakshmanan, closes vim/vim#11974, closes vim/vim#11972) https://github.com/vim/vim/commit/32ff96ef018eb1a5bea0953648b4892a6ee71658 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* | | | fix(tui): exit on input eofzeertzjq2023-02-14
| | | |
* | | | build: remove ENABLE_COMPILER_SUGGESTIONS option (#22249)dundargoc2023-02-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We need higher level and more meaningful cmake options. Having a cmake option for only controlling compiler flags is probably not worth it as the same can be achieved with: cmake -B build -D CMAKE_C_FLAGS=<compiler option>
* | | | ci: automatically maximize MIN_LOG_LEVEL if CI detected (#22248)dundargoc2023-02-13
| | | | | | | | | | | | | | | | | | | | Detect if on CI by checking that the CI environment variable is set to "true". This is a common pattern among CI providers, including github actions and cirrus.