aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/option.c
Commit message (Collapse)AuthorAge
* Merge branch 'master' of https://github.com/neovim/neovim into rahmtmpJosh Rahm2022-08-19
|\
| * vim-patch:8.1.1966: some code in options.c fits better elsewhere (#19840)zeertzjq2022-08-19
| | | | | | | | | | | | Problem: Some code in options.c fits better elsewhere. Solution: Move functions from options.c to other files. (Yegappan Lakshmanan, closes vim/vim#4889) https://github.com/vim/vim/commit/e677df8d93772a705f40a94f3c871aee78fe4d99
| * vim-patch:8.1.2057: the screen.c file is much too bigLewis Russell2022-08-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: The screen.c file is much too big. Solution: Split it in three parts. (Yegappan Lakshmanan, closes vim/vim#4943) https://github.com/vim/vim/commit/7528d1f6b5422750eb778dfb550cfd0b0e540964 This is an approximation vim-patch 8.1.2057. Applying the patch directly isn't feasible since our version of screen.c has diverged too much, however we still introduce drawscreen.c and drawline.c: - screen.c is now a much smaller file used for low level screen functions - drawline.c contains everything needed for win_line() - drawscreen.c contains everything needed for update_screen() Co-authored-by: zeertzjq <zeertzjq@outlook.com>
| * vim-patch:8.1.2082: rename popupmnu.* to popupmenu.* (#19829)zeertzjq2022-08-18
| | | | | | | | | | | | | | vim-patch:8.1.2082: some files have a weird name to fit in 8.3 characters Problem: Some files have a weird name to fit in 8.3 characters. Solution: Use a nicer names. https://github.com/vim/vim/commit/30e8e73506e4522ef4aebf7d525c0e6ffe8805fd
| * feat(ui): allow to set the highlight namespace per windowbfredl2022-08-17
| | | | | | | | | | - reimplement 'winhl' in terms of highlight namespaces - check for EOF in screen tests (to indicate a likely crash)
| * vim-patch:8.1.1869: code for the argument list is spread out (#19791)zeertzjq2022-08-16
| | | | | | | | | | | | Problem: Code for the argument list is spread out. Solution: Put argument list code in arglist.c. (Yegappan Lakshmanan, closes vim/vim#4819) https://github.com/vim/vim/commit/4ad62155a1015751a6645aaecd94b02c94c8934b
| * vim-patch:8.1.2081: the spell.c file is too big (#19767)zeertzjq2022-08-14
| | | | | | | | | | | | Problem: The spell.c file is too big. Solution: Move the code for spell suggestions to a separate file. (Yegappan Lakshmanan, closes vim/vim#4988) https://github.com/vim/vim/commit/46a426c9acfdd3d6c0fa134a17681634b9325bee
| * vim-patch:8.2.0056: execution stack is incomplete and inefficientzeertzjq2022-08-14
| | | | | | | | | | | | | | | | | | | | | | Problem: Execution stack is incomplete and inefficient. Solution: Introduce a proper execution stack and use it instead of sourcing_name/sourcing_lnum. Create a string only when used. https://github.com/vim/vim/commit/1a47ae32cdc19b0fd5a82e19fe5fddf45db1a506 Omit test_debugger.vim: superseded by later patches. Omit check_map_keycodes(): N/A. Omit kword_test.c: N/A (converted to a unit test).
| * fix(winbar): do not always assume cursor is valid. fixes #19458bfredl2022-08-13
| |
| * refactor: replace char_u with charDundar Goc2022-08-12
| | | | | | | | Work on https://github.com/neovim/neovim/issues/459
| * refactor: use CLEAR_FIELD and CLEAR_POINTER macros (#19709)zeertzjq2022-08-11
| | | | | | | | | | | | | | vim-patch:8.2.0559: clearing a struct is verbose Problem: Clearing a struct is verbose. Solution: Define and use CLEAR_FIELD() and CLEAR_POINTER(). https://github.com/vim/vim/commit/a80faa8930ed5a554beeb2727762538873135e83
| * vim-patch:9.0.0176: checking character options is duplicated and incomplete ↵zeertzjq2022-08-09
| | | | | | | | | | | | | | (#19690) Problem: Checking character options is duplicated and incomplete. Solution: Move checking to check_chars_options(). (closes vim/vim#10863) https://github.com/vim/vim/commit/8ca29b6a3599b82b8822b7697cad63d0244c2d59
| * fix(fillchars): change fallback after setcellwidths()zeertzjq2022-08-08
| |
| * vim-patch:8.2.3545: setcellwidths() may make 'listchars' or 'fillchars' invalidzeertzjq2022-08-08
| | | | | | | | | | | | | | | | | | Problem: setcellwidths() may make 'listchars' or 'fillchars' invalid. Solution: Check the value and give an error. (closes vim/vim#9024) https://github.com/vim/vim/commit/94358a1e6e640ca5ebeb295efdddd4e92b700673 Cherry-pick f_setcellwidths() change from patch 9.0.0036. Cherry-pick 'ambiwidth' docs update from runtime update 079ba76ae7a7.
* | Merge remote-tracking branch 'upstream/master' into rahmJosh Rahm2022-08-03
|\|
| * refactor: replace char_u with charDundar Goc2022-07-31
| | | | | | | | Work on https://github.com/neovim/neovim/issues/459
| * vim-patch:9.0.0096: flag "new_value_alloced" is always truezeertzjq2022-07-28
| | | | | | | | | | | | Problem: Flag "new_value_alloced" is always true. Solution: Remove "new_value_alloced". (closes vim/vim#10792) https://github.com/vim/vim/commit/f6782732ab4acd02211923fbdccb457dacaf277e
| * vim-patch:9.0.0090: no error when assigning bool to a string option (#19539)zeertzjq2022-07-27
| | | | | | | | | | Problem: No error when assigning bool to a string option with setwinvar(). Solution: Give an error (closes vim/vim#10766) https://github.com/vim/vim/commit/28f84e17b068daca2635692d279930dcb7a150d0
| * vim-patch:8.2.2254: Vim9: bool option type is numberzeertzjq2022-07-25
| | | | | | | | | | | | | | Problem: Vim9: bool option type is number. Solution: Have get_option_value() return a different value for bool and number options. (closes vim/vim#7583) https://github.com/vim/vim/commit/dd1f426bd617ac6a775f2e7795ff0b159e3fa315
| * vim-patch:8.1.1933: the eval.c file is too big (#19462)zeertzjq2022-07-22
| | | | | | | | | | | | | | | | Problem: The eval.c file is too big. Solution: Move code related to variables to evalvars.c. (Yegappan Lakshmanan, closes vim/vim#4868) https://github.com/vim/vim/commit/0522ba0359c96a8c2a4fc8fca0d3b58e49dda759 Name the new file eval/vars.c instead.
| * Merge pull request #19445 from famiu/fix/local_winbar_tabsbfredl2022-07-20
| |\ | | | | | | fix: local winbar with tabs
| | * fix: local winbar with tabsFamiu Haque2022-07-20
| | | | | | | | | | | | Closes #19396
| * | vim-patch:8.1.1076: file for Insert mode is much too bigzeertzjq2022-07-20
| |/ | | | | | | | | | | | | | | | | | | | | | | Problem: File for Insert mode is much too big. Solution: Split off the code for Insert completion. (Yegappan Lakshmanan, closes vim/vim#4044) https://github.com/vim/vim/commit/7591bb39d58ece38a5fef984a08ea9012616c1f9 Cherry-pick ins_compl_len() -> get_compl_len() from patch 8.2.4001. Revert a71c5e9eb98fbb2ca88510269935cdcda37369fc: ctrl_x_mode is no longer a global variable, so l_ctrl_x_mode is no longer needed.
* | Merge remote-tracking branch 'upstream/master' into rahmJosh Rahm2022-07-18
|\|
| * fix: remote UI may get invalid 'pumblend' value #19379Natasha England-Elbro2022-07-15
| | | | | | fixes: https://github.com/neovim/neovim/issues/19340
| * feat: add 'mousescroll' option (#12355)Jay2022-07-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add 'mousescroll' option to control how many lines to scroll by when a mouse wheel keycode is received. The mousescroll option controls both horizontal and vertical scrolling. The option is a string in the format: set mousescroll=direction:count,direction:count Where direction is either "ver" or "hor", and count is a non negative integer. If a direction is omitted, a default value is used. The default values remain unchanged, that is 3 for vertical scrolling, and 6 for horizontal scrolling. As such, the mousescroll default is "ver:3,hor:6". Add mousescroll documentation - Add option documentation in options.txt - Add brief summary in quickref.txt Update :help scroll-mouse-wheel - Mention mousescroll option as a means of controlling scrolling. - Remove obsolete suggestion to map scroll wheel keys to <C-U> to scroll by a single line -- users should prefer the mousescroll option. - Add some information about the consequences of remapping scroll wheel keys (they lose their magic ability to affect inactive windows). Update :help vim-differences - Add brief mousescroll summary under Options Add mousescroll tests - Test option validation - Test default mousescroll value and behavior - Test fallback to default values - Test mouse vertical and horizontal scrolling in normal mode - Test mouse vertical and horizontal scrolling in insert mode
| * refactor: replace char_uDundar Goc2022-07-02
| | | | | | | | Work on https://github.com/neovim/neovim/issues/459
| * refactor: replace char_u #18429dundargoc2022-06-28
| | | | | | Work on https://github.com/neovim/neovim/issues/459
| * fix(spell): make setting 'encoding' clear word listzeertzjq2022-06-27
| |
| * 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!
| * 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().
| * 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.
| * docs: fix typos (#18866)dundargoc2022-06-15
| | | | | | | | | | | | | | docs: fix typos and similarly insignificant changes Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: smjonas <jonas.strittmatter@gmx.de> Co-authored-by: kanreki <32443233+kanreki@users.noreply.github.com>
| * vim-patch:8.2.1898: command modifier parsing always uses global cmdmodzeertzjq2022-06-14
| | | | | | | | | | | | Problem: Command modifier parsing always uses global cmdmod. Solution: Pass in cmdmod_T to use. Rename struct fields consistently. https://github.com/vim/vim/commit/e10044015841711b989f9a898d427bcc1fdb4c32
| * feat: cmdheight=0 #16251Shougo2022-06-13
| | | | | | | | | | | | | | | | | | Fix https://github.com/neovim/neovim/issues/1004 Limitation: All outputs need hit-enter prompt. Related: https://github.com/neovim/neovim/pull/6732 https://github.com/neovim/neovim/pull/4382
| * vim-patch:8.2.5070: unnecessary codezeertzjq2022-06-09
| | | | | | | | | | | | Problem: Unnecessary code. Solution: Remove code that isn't needed. (closes vim/vim#10534) https://github.com/vim/vim/commit/b5f0801b1f043b5cf99380f58eca51b75b3236c7
| * vim-patch:8.2.5066: lcs-leadmultispacezeertzjq2022-06-09
| | | | | | | | https://github.com/vim/vim/commit/aca12fd89b082dd9cc12ae085a84f1805747bbdf
| * fix(terminal): scrollback delete lines immediately #18832Javier Lopez2022-06-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * on_scrollback_option_changed renamed to adjust_scrollback. The function name did not correspond to what it was doing. It is called unconditionally in every refresh of the terminal unrelated if the scrollback option was changed. * new on_scrollback_option_changed function, which calls refresh_terminal, which then calls adjust_scrollback * terminal_check_size is not the appropriate function to call when the option is changed since it only conditionally adjusts the scrollback. Use the new on_scrollback_option_changed fixes #15477 fixes #11811
| * refactor(uncrustify): set maximum number of consecutive newlines to 2 (#18695)dundargoc2022-05-25
| |
| * refactor!: delete insertmode (#18547)Gregory Anders2022-05-22
| | | | | | | | | | | | | | Neovim already removed `evim` (or any similar flags). The 'insertmode' option is a weird remnant, so get rid of it. The 'insertmode' option is replaced with a script that closely emulates the option. This script is documented at :help 'insertmode'
| * vim-patch:8.2.4993: smart/C/lisp indenting is optional (#18684)zeertzjq2022-05-22
| | | | | | | | | | | | Problem: smart/C/lisp indenting is optional, which makes the code more complex, while it only reduces the executable size a bit. Solution: Graduate FEAT_CINDENT, FEAT_SMARTINDENT and FEAT_LISP. https://github.com/vim/vim/commit/8e145b82464a21ee4fdf7948f04e2a1d505f8bfa
| * refactor!: remove 'terse' optionDundar Goc2022-05-19
| | | | | | | | | | Having two methods of setting the same option is redundant and can be potentially confusing. Recommend adding 's' to 'shortmess' instead.
| * feat(ui): add `'winbar'`Famiu Haque2022-05-18
| | | | | | | | | | | | | | Adds support for a bar at the top of each window, enabled through the `'winbar'` option. Co-authored-by: Björn Linse <bjorn.linse@gmail.com>
| * refactor: replace char_u variables and functions with charDundar Goc2022-05-16
| | | | | | | | Work on https://github.com/neovim/neovim/issues/459
| * vim-patch:8.2.4943: changing 'switchbuf' may have no effect (#18545)Sean Dewar2022-05-13
| | | | | | | | | | | | | | | | | | Problem: Changing 'switchbuf' may have no effect. Solution: Handle 'switchbuf' in didset_string_options(). (Sean Dewar, closes vim/vim#10406) https://github.com/vim/vim/commit/39c46b43780ad00ea27a93d92aadd44753d4c3ea Guess it doesn't hurt to cherry-pick didset_string_options from v8.1.2045 (but in option.c, for now).
| * Merge pull request #18489 from dundargoc/refactor/remove-char_ubfredl2022-05-13
| |\ | | | | | | refactor: replace char_u variables and functions with char
| | * refactor: replace char_u variables and functions with charDundar Goc2022-05-11
| | | | | | | | | | | | Work on https://github.com/neovim/neovim/issues/459
| * | feat(defaults): session data in $XDG_STATE_HOME #15583Ivan2022-05-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See: https://gitlab.freedesktop.org/xdg/xdg-specs/-/commit/4f2884e16db35f2962d9b64312917c81be5cb54b - Move session persistent data to $XDG_STATE_HOME Change 'directory', 'backupdir', 'undodir', 'viewdir' and 'shadafile' default location to $XDG_STATE_HOME/nvim. - Move logs to $XDG_STATE_HOME, too. - Add stdpath('log') support. Fixes: #14805
| * | refactor: rename keymap.{c,h} to keycodes.{c,h} (#18535)zeertzjq2022-05-12
| |/ | | | | | | | | | | | | | | Most code in keymap.h is for keycode definitions, while most code in keymap.c is for the parsing and conversion of keycodes. The name "keymap" may also make people think these two files are for mappings, while in fact keycodes are used even when no mappings are involved, so "keycodes" should be a better file name than "keymap".
| * vim-patch:8.2.4911: the mode #defines are not clearly named (#18499)zeertzjq2022-05-10
| | | | | | | | | | | | | | | | Problem: The mode #defines are not clearly named. Solution: Prepend MODE_. Renumber them to put the mapped modes first. https://github.com/vim/vim/commit/249591057b4840785c50e41dd850efb8a8faf435 A hunk from the patch depends on patch 8.2.4861, which hasn't been ported yet, but that should be easy to notice.