aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/option.c
Commit message (Collapse)AuthorAge
...
| * vim-patch:8.2.4924: maparg() may return a string that cannot be reusedzeertzjq2022-05-09
| | | | | | | | | | | | | | Problem: maparg() may return a string that cannot be reused. Solution: use msg_outtrans_special() instead of str2special(). (closes vim/vim#10384) https://github.com/vim/vim/commit/0519ce00394474055bd58c089ea90a19986443eb
| * refactor: replace char_u variables and functions with charDundar Goc2022-05-09
| | | | | | | | Work on https://github.com/neovim/neovim/issues/459
| * Merge pull request #18425 from dundargoc/refactor/char_u/1bfredl2022-05-07
| |\ | | | | | | refactor: replace char_u variables and functions with char
| | * refactor: replace char_u variables and functions with charDundar Goc2022-05-07
| | | | | | | | | | | | Work on https://github.com/neovim/neovim/issues/459
| * | build(clint): remove "function size is too large" warningDundar Goc2022-05-06
| |/ | | | | | | | | | | | | | | This warning is essentially only triggered for ported vim functions. It's unlikely that we'll refactor vim functions solely based on their size since it'd mean we'd greatly deviate from vim, which is a high cost when it comes to importing the vim patches. Thus, this warning only serves as an annoyance and should be removed.
| * refactor: replace char_u variables and functions with charDundar Goc2022-05-04
| | | | | | | | Work on https://github.com/neovim/neovim/issues/459
| * refactor(uncrustify): change rules to better align with the style guideDundar Goc2022-04-29
| | | | | | | | | | | | | | | | | | | | | | | | | | Add space around arithmetic operators '+' and '-'. Remove space between back-to-back parentheses, i.e. ')(' vs. ') ('. Remove space between '((' or '))' of control statements. Add space between ')' and '{' of control statements. Remove space between function name and '(' on function declaration. Collapse empty blocks between '{' and '}'. Remove newline at the end of the file. Remove newline between 'enum' and '{'. Remove newline between '}' and ')' in a function invocation. Remove newline between '}' and 'while' of 'do' statement.
| * vim-patch:8.2.0855: GUI tests fail because the test doesn't use a modifierzeertzjq2022-04-29
| | | | | | | | | | | | | | | | Problem: GUI tests fail because the test doesn't use a modifier. Solution: Add "\{xxx}" to be able to encode a modifier. https://github.com/vim/vim/commit/ebe9d34aa07037cff2188a8dd424ee1f59cbb0bf Change macros to enums to use them in unit tests.
| * vim-patch:8.1.2145: cannot map <C-H> when modifyOtherKeys is enabledzeertzjq2022-04-29
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Cannot map <C-H> when modifyOtherKeys is enabled. Solution: Add the <C-H> mapping twice, both with modifier and as 0x08. Use only the first one when modifyOtherKeys has been detected. https://github.com/vim/vim/commit/459fd785e4a8d044147a3f83a5fca8748528aa84 Add REPTERM_NO_SPECIAL instead of REPTERM_SPECIAL because the meaning of "special" is different between Vim and Nvim. Omit seenModifyOtherKeys as Nvim supports attaching multiple UIs. Omit tests as they send terminal codes. Keep the behavior of API functions.
| * refactor: convert macros to all-caps (#17895)dundargoc2022-04-24
| | | | | | Closes https://github.com/neovim/neovim/issues/6297
| * vim-patch:8.2.4724: current instance of last search pattern not easily spottedzeertzjq2022-04-21
| | | | | | | | | | | | | | | | | | Problem: Current instance of last search pattern not easily spotted. Solution: Add CurSearch highlighting. (closes vim/vim#10133) https://github.com/vim/vim/commit/a43993897aa372159f682df37562f159994dc85c This fixes CurSearch highlight for multiline match. Omit screen redrawing code because Nvim redraws CurSearch differently.
| * Merge pull request #18145 from bfredl/term_optbfredl2022-04-20
| |\ | | | | | | feat(api): allow remote UI to set terminal options
| | * feat(api): ui options relevant for remote TUIhlpr982022-04-17
| | |
| * | vim-patch:8.2.4752: wrong 'statusline' value can cause illegal memory access ↵zeertzjq2022-04-15
| |/ | | | | | | | | | | | | | | | | (#18117) Problem: Wrong 'statusline' value can cause illegal memory access. Solution: Properly check the value. (closes vim/vim#10192) https://github.com/vim/vim/commit/5dc294a7b63ed0e508dd360bc4d98173f1a1aeec Make two error messages static variables.
| * vim-patch:8.2.4750: small pieces of dead code (#18113)dundargoc2022-04-15
| | | | | | | | | | | | Problem: Small pieces of dead code. Solution: Remove the dead code. (Goc Dundar, closes vim/vim#10190) Rename the qftf_cb struct member to avoid confusion. https://github.com/vim/vim/commit/b836658a04ee5456deca2ee523de9efe51252da3
| * Merge pull request #18023 from tom-anders/vim-8.2.4702zeertzjq2022-04-09
| |\ | | | | | | vim-patch:8.2.{4702,4703}: C++ scope labels are hard-coded
| | * vim-patch:8.2.4702: C++ scope labels are hard-codedTom Praschan2022-04-09
| | | | | | | | | | | | | | | | | | | | | Problem: C++ scope labels are hard-coded. Solution: Add 'cinscopedecls' to define the labels. (Tom Praschan, closes vim/vim#10109) https://github.com/vim/vim/commit/3506cf34c17c5eae6c2d1317db1fcd5a8493c288
| * | vim-patch:8.2.4704: using "else" after return or break increases indent (#18032)zeertzjq2022-04-08
| |/ | | | | | | | | Problem: Using "else" after return or break increases indent. Solution: Remove "else" and reduce indent. (Goc Dundar, closes vim/vim#10099) https://github.com/vim/vim/commit/f26c16144ddb27642c09f2cf5271afd163b36306
| * perf(screen): reduce cursorline redrawing when jumping aroundzeertzjq2022-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vim-patch:8.2.4614: redrawing too much when 'cursorline' is set Problem: Redrawing too much when 'cursorline' is set and jumping around. Solution: Rely on win_update() to redraw the current and previous cursor line, do not mark lines as modified. (closes vim/vim#9996) https://github.com/vim/vim/commit/c20e46a4e3efcd408ef132872238144ea34f7ae5 This doesn't match the patch exactly, because I missed some lines when porting patch 8.1.2029, and these lines were removed in this patch. This also makes win_update() always update for 'concealcursor' like how it always updates for 'cursorline', as 'cursorline' and 'concealcursor' redrawing logic has been unified in Nvim. As redrawing for 'cursorline' now always only requires VALID redraw type, it is no longer necessary to call redraw_for_cursorline() in nvim_win_set_cursor().
| * vim-patch:8.1.1693: syntax coloring and highlighting is in one big file (#17721)Lewis Russell2022-03-18
| | | | | | | | | | | | | | | | | | | | | | Problem: Syntax coloring and highlighting is in one big file. Solution: Move the highlighting to a separate file. (Yegappan Lakshmanan, closes vim/vim#4674) https://github.com/vim/vim/commit/f9cc9f209ede9f15959e4c2351e970477c139614 Name the new file highlight_group.c instead. Co-authored-by: zeertzjq <zeertzjq@outlook.com>
| * Merge pull request #17266 from famiu/feat/ui/global-statuslinebfredl2022-03-17
| |\ | | | | | | feat(statusline): add global statusline
| | * feat: add support for global statuslineFamiu Haque2022-03-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ref: #9342 Adds the option to have a single global statusline for the current window at the bottom of the screen instead of a statusline at the bottom of every window. Enabled by setting `laststatus = 3`. Due to the fact that statuslines at the bottom of windows are removed when global statusline is enabled, horizontal separators are used instead to separate horizontal splits. The horizontal separator character is configurable through the`horiz` item in `'fillchars'`. Separator connector characters are also used to connect the horizontal and vertical separators together, which are also configurable through the `horizup`, `horizdown`, `vertleft`, `vertright` and `verthoriz` items in `fillchars`. The window separators are highlighted using the `WinSeparator` highlight group, which supersedes `VertSplit` and is linked to `VertSplit` by default in order to maintain backwards compatibility.
| * | fix(coverity): dead code and operands don't affect result #17662dundargoc2022-03-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fix(coverity/349942): structurally dead code * fix(coverity/331396): operands don't affect result * fix(coverity/331393): operands don't affect result * fix(coverity/331392): operands don't affect result * fix(coverity/331384): operands don't affect result * fix(coverity/331374): operands don't affect result * fix(coverity/331372): operands don't affect result * fix(coverity/331371): operands don't affect result * fix(coverity/331364): operands don't affect result * fix(coverity/105585): operands don't affect result
| * | refactor: remove redundant castsDundar Göc2022-03-06
| | |
| * | feat(lua): show proper verbose output for lua configurationshadmansaleh2022-02-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `:verbose` didn't work properly with lua configs (For example: options or keymaps are set from lua, just say that they were set from lua, doesn't say where they were set at. This fixes that issue. Now `:verbose` will provide filename and line no when option/keymap is set from lua. Changes: - compiles lua/vim/keymap.lua as vim/keymap.lua - When souring a lua file current_sctx.sc_sid is set to SID_LUA - Moved finding scripts SID out of `do_source()` to `get_current_script_id()`. So it can be reused for lua files. - Added new function `nlua_get_sctx` that extracts current lua scripts name and line no with debug library. And creates a sctx for it. NOTE: This function ignores C functions and blacklist which currently contains only vim/_meta.lua so vim.o/opt wrappers aren't targeted. - Added function `nlua_set_sctx` that changes provided sctx to current lua scripts sctx if a lua file is being executed. - Added tests in tests/functional/lua/verbose_spec.lua - add primary support for additional types (:autocmd, :function, :syntax) to lua verbose Note: These can't yet be directly set from lua but once that's possible :verbose should work for them hopefully :D - add :verbose support for nvim_exec & nvim_command within lua Currently auto commands/commands/functions ... can only be defined by nvim_exec/nvim_command this adds support for them. Means if those Are defined within lua with vim.cmd/nvim_exec :verbose will show their location . Though note it'll show the line no on which nvim_exec call was made.
| * | fix(signcol): handle edge case with maximum valueLewis Russell2022-02-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | 50250542 failed to consider that the maximum passed to buf_signcols is window scoped whereas the signcols value is buffer scoped. This can lead to a bug where the signcolumn becomes incorrect if: - global signcolumn is set to auto:N - signcolumn in a window is changed locally to auto:M where M > N - the buffer has a line with M or greater signs.
| * | vim-patch:8.2.0156: various typos in source files and testszeertzjq2022-02-14
| |/ | | | | | | | | | | Problem: Various typos in source files and tests. Solution: Fix the typos. (Emir Sari, closes vim/vim#5532) https://github.com/vim/vim/commit/4b96df5a017a04141c4e901b1fc5704a3ca48099
| * vim-patch:8.1.2184: option context is not copied when splitting a windowzeertzjq2022-02-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Option context is not copied when splitting a window. (Daniel Hahler) Solution: Copy the option context, so that ":verbose set" works. (closes vim/vim#5066) https://github.com/vim/vim/commit/cfb381421f8be7d6cb4e7dac5b827b23467d3e53 vim-patch:8.2.3804: script context not set when copying 'swf' and 'ts' Problem: Script context not set when copying 'swf' and 'ts'. Solution: Use COPY_OPT_SCTX with the right argument. (closes vim/vim#9347) https://github.com/vim/vim/commit/6206877c511c636cbeb2a2b911451af316b62d00
| * refactor(signs): more efficient signcol calcLewis Russell2022-02-12
| | | | | | | | | | When iterating signs to calculate the sign column, stop iterating when we reach the maximum configured from 'signcolumn'.
| * vim-patch:8.1.2073: when editing a buffer 'colorcolumn' may not workzeertzjq2022-02-12
| | | | | | | | | | | | | | Problem: When editing a buffer 'colorcolumn' may not work. Solution: Set the buffer before copying option values. Call check_colorcolumn() after copying window options. https://github.com/vim/vim/commit/010ee9657acf1a9f799079d718998c94e50ccadc
| * vim-patch:8.2.4298: divide by zero with huge tabstop valuezeertzjq2022-02-05
| | | | | | | | | | | | Problem: Divide by zero with huge tabstop value. Solution: Reject tabstop value that overflows to zero. https://github.com/vim/vim/commit/fc88df42f1ae64bcc4d6cbc0fbd3445f8c59afdf
| * Merge pull request #17226 from dundargoc/refactor/remove-redundant-codezeertzjq2022-02-03
| |\ | | | | | | vim-patch:8.2.4241: some type casts are redundant
| | * vim-patch:8.2.4241: some type casts are redundantDundar Göc2022-01-30
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Some type casts are redundant. Solution: Remove the type casts. (closes vim/vim#9643) https://github.com/vim/vim/commit/420fabcd4ffeaf79082a6e43db91e1d363f88f27 This is not a literal port but an equivalent one.
| * | Merge pull request #17231 from seandewar/vim-8.2.4245Sean Dewar2022-01-31
| |\ \ | | |/ | |/| vim-patch:8.2.4245: ":retab 0" may cause illegal memory access
| | * vim-patch:8.2.4245: ":retab 0" may cause illegal memory accessSean Dewar2022-01-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: ":retab 0" may cause illegal memory access. Solution: Limit the value of 'tabstop' to 10000. https://github.com/vim/vim/commit/652dee448618589de5528a9e9a36995803f5557a ex_retab change is N/A (+vartabs always available). Nvim's set_num_option validation logic was refactored, hence why it looks different from Vim's. Also use XFREE_CLEAR in other places.
| * | feat(provider)!: remove support for python2 and python3.[3-5]Björn Linse2022-01-29
| |/ | | | | | | | | | | These versions of python has reached End-of-life. getting rid of python2 support removes a lot of logic to support two incompatible python versions in the same version.
| * Merge pull request #16954 from f380cedric/vim-8.2.3402Sean Dewar2022-01-27
| |\ | | | | | | vim-patch:8.2.{3402,3403}
| | * vim-patch:8.2.3403: memory leak for :retab with invalid argumentf380cedric2022-01-27
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Memory leak for :retab with invalid argument. Solution: Free the memory. Make error messages consistent. https://github.com/vim/vim/commit/2ddb89f8a94425cda1e5491efc80c1ccccb6e08e Changes in ex_retab are N/A (behind a non-FEAT_) and have been dropped.
| | * vim-patch:8.2.3402: invalid memory access when using :retab with large valuef380cedric2022-01-18
| | | | | | | | | | | | | | | | | | Problem: Invalid memory access when using :retab with large value. Solution: Check the number is positive. https://github.com/vim/vim/commit/b7081e135a16091c93f6f5f7525a5c58fb7ca9f9
| * | Merge pull request #17145 from zeertzjq/vim-8.2.0128bfredl2022-01-27
| |\ \ | | | | | | | | vim-patch:8.2.0128: cannot list options one per line
| | * | vim-patch:8.2.0128: cannot list options one per linezeertzjq2022-01-20
| | |/ | | | | | | | | | | | | | | | Problem: Cannot list options one per line. Solution: Use ":set!" to list one option per line. https://github.com/vim/vim/commit/6b915c0c0ee7ef82f8d3d310a4345e098cb929b0
| * | vim-patch:8.2.3280: 'virtualedit' local to buffer is not the best solutionzeertzjq2022-01-15
| | | | | | | | | | | | | | | | | | Problem: 'virtualedit' local to buffer is not the best solution. Solution: Make it window-local. (Gary Johnson, closes vim/vim#8685) https://github.com/vim/vim/commit/51ad850f5fbafa7aa3f60affa74ec9c9f992c6cc
| * | vim-patch:8.2.3227: 'virtualedit' can only be set globallyzeertzjq2022-01-15
| |/ | | | | | | | | | | | | | | Problem: 'virtualedit' can only be set globally. Solution: Make 'virtualedit' global-local. (Gary Johnson, closes vim/vim#8638) https://github.com/vim/vim/commit/53ba05b09075f14227f9be831a22ed16f7cc26b2 I changed some macros to unsigned integer literals to avoid compiler warnings.
* | Add user-registers for arbitrary registers.Josh Rahm2022-01-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows users to define behaviors for arbitrary registers. These registers can be any character including multibyte characters. This means that any character may be used as a register and if that register is not a builtin register, it will defer to a user-defined vimscript function for behavior. This is done throw an option called 'userregfun' The function that 'userregfun' defines is a function that takes 3 arguments: action - Either set to "put" or "yank" register - The character representing the register. content - If the action is "yank" this string contains the content yanked. Multibyte registers are still broken for expressions. So while let @&=xyz Works as expected, let @λ=xyz will still throw a parse error.
* | Move colorcolumn character option to fillchars.Josh Rahm2022-01-11
| | | | | | | | listchars is not the right place for it.
* | Add a colorcolumn character option.Josh Rahm2022-01-11
|/ | | | | | | | | | This option allows a character to be displayed in the colorcolumn. This allows the colorcolumn ot have a traditional line if the colorcolumn character is set to a vertical line '│' or even a series of dots for a ':'. The option is a part of the 'listchars' setting under the name 'colorcol'. So 'set listchars=colorcol:│' will work.
* vim-patch:8.2.3914 (#16808)dundargoc2021-12-28
| | | | | | | | | * vim-patch:8.2.3914: various spelling mistakes in comments Problem: Various spelling mistakes in comments. Solution: Fix the mistakes. (Dominique Pellé, closes vim/vim#9416) https://github.com/vim/vim/commit/af4a61a85d6e8cacc35324f266934bc463a21673 Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* Merge pull request #16705 from zeertzjq/vim-8.2.2508Jan Edmund Lazo2021-12-25
|\ | | | | vim-patch:8.2.{2508,2641,3846}
| * vim-patch:8.2.3846: no error when using control character for 'lcs' or 'fcs'zeertzjq2021-12-19
| | | | | | | | | | | | Problem: No error when using control character for 'lcs' or 'fcs'. Solution: Use char2cells() to check the width. (closes vim/vim#9369) https://github.com/vim/vim/commit/60618c8f1a7ea55452837a446525272142286471
* | fix(options): disallow empty 'fdc' and 'scl' (#16765)Sean Dewar2021-12-24
| | | | | | | | | | | | | | | | | | Empty string values for these options aren't actually allowed, but check_opt_strings allows empty string options. It so happens that 'scl' handles empty string like "auto", but empty 'fdc' causes glitchiness (win_fdccol_count returns an incorrect value). Just disallow empty string values for these options completely.