aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/option.c
Commit message (Collapse)AuthorAge
...
| * vim-patch:9.0.0835: the window title is not redrawn when 'endoffile' changes ↵zeertzjq2022-11-06
| | | | | | | | | | | | | | | | | | | | | | (#20951) Problem: The window title is not redrawn when 'endoffile' changes. Solution: redraw the window title when 'endoffile' is changed. (Ken Takata, closes vim/vim#11488) https://github.com/vim/vim/commit/845bbb72ed2da4b5fb2a503d91cfd6435df2f584 Co-authored-by: K.Takata <kentkt@csc.jp>
| * vim-patch:8.2.4100: early return when getting the 'formatlistpat' valuezeertzjq2022-11-05
| | | | | | | | | | | | Problem: Early return when getting the 'formatlistpat' value. Solution: Remove the first line. (Christian Brabandt) https://github.com/vim/vim/commit/04b871da800768287a8a432de568b11297db8686
| * vim-patch:8.2.4093: cached breakindent values not initialized properlyzeertzjq2022-11-05
| | | | | | | | | | | | | | | | | | Problem: Cached breakindent values not initialized properly. Solution: Initialize and cache formatlistpat. (Christian Brabandt, closes vim/vim#9526, closes vim/vim#9512) https://github.com/vim/vim/commit/c53b467473160b5cfce77277fbae414bf43e66ce Co-authored-by: Christian Brabandt <cb@256bit.org>
| * vim-patch:9.0.0816: CTRL-Z at end of file is always droppedzeertzjq2022-10-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: CTRL-Z at end of file is always dropped. Solution: Add the 'endoffile' option, like the 'endofline' option. (closes vim/vim#11408, closes vim/vim#11397) Cherry-pick test_fixeol.vim changes from patch 8.2.1432. Cherry-pick 'endoffile' changes from latest Vim runtime update. https://github.com/vim/vim/commit/fb0cf2357e0c85bbfd9f9178705ad8d77b6b3b4e vim-patch:f0b567e32a46 Revert unintended Makefile change https://github.com/vim/vim/commit/f0b567e32a462fe838170a202919d18b53eff987 vim-patch:72c8e3c070b3 Fix wrong struct access for member. https://github.com/vim/vim/commit/72c8e3c070b30f82bc0d203a62c168e43a13e99b vim-patch:3f68a4136eb9 Add missing entry for the 'endoffile' option. https://github.com/vim/vim/commit/3f68a4136eb99840d739af5133ab31948f273f63 Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * fix: setting tabline option not redrawing tablineshadmansaleh2022-10-24
| | | | | | | | | | | | | | | | | | With #20374 tabline option is marked with 'statuslines' redraw flag. But 'statuslines' doesn't redraw tabline. As a result, tabline doesn't get redrawn when tabline option is set and statuslines get unnecessarily redrawn. This patch fixes the issue by adding a new redraw flag P_RTABL to redraw tabline.
| * refactor: clang-tidy fixes to silence clangd warning (#20683)dundargoc2022-10-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * refactor: readability-uppercase-literal-suffix * refactor: readability-named-parameter * refactor: bugprone-suspicious-string-compare * refactor: google-readability-casting * refactor: readability-redundant-control-flow * refactor: bugprone-too-small-loop-variable * refactor: readability-non-const-parameter * refactor: readability-avoid-const-params-in-decls * refactor: google-readability-todo * refactor: readability-inconsistent-declaration-parameter-name * refactor: bugprone-suspicious-missing-comma * refactor: remove noisy or slow warnings
| * vim-patch:9.0.0761: cannot use 'indentexpr' for Lisp indentingzeertzjq2022-10-16
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Cannot use 'indentexpr' for Lisp indenting. Solution: Add the 'lispoptions' option. https://github.com/vim/vim/commit/49846fb1a31de99f49d6a7e70efe685197423c84 vim-patch:9.0.0762: build failure Problem: Build failure. Solution: Add missing change. https://github.com/vim/vim/commit/4b082c4bd05f504fda1acaa9d28fca55a2d04857
| * refactor: replace char_u with charDundar Göc2022-10-15
| | | | | | | | Work on https://github.com/neovim/neovim/issues/459
| * vim-patch:8.2.4453: :helpgrep may free an option that was not allocatedzeertzjq2022-10-13
| | | | | | | | | | | | | | Problem: :helpgrep may free an option that was not allocated. (Yegappan Lakshmanan) Solution: Check if the value was allocated. https://github.com/vim/vim/commit/4791fcd82565adcc60b86830e0bb6cd5b6eea0a6
| * refactor: clint (#20600)Lewis Russell2022-10-12
| |
* | Merge remote-tracking branch 'upstream/master' into userregJosh Rahm2022-10-11
|\|
| * fix(ui): setting 'cmdheight' with global statusline (#20515)zeertzjq2022-10-07
| |
| * vim-patch:9.0.0670: no space for command line when there is a tabline (#20512)zeertzjq2022-10-06
| | | | | | | | | | | | Problem: No space for command line when there is a tabline. Solution: Correct computation of where the command line should be. (closes vim/vim#11295) https://github.com/vim/vim/commit/c9f5f73206272ccad0aa536854debc5f9781978a
| * vim-patch:9.0.0665: setting 'cmdheight' has no effect if last window was ↵zeertzjq2022-10-06
| | | | | | | | | | | | | | | | resized (#20500) Problem: Setting 'cmdheight' has no effect if last window was resized. Solution: Do apply 'cmdheight' when told to. Use the frame height instead of the cmdline_row. (closes vim/vim#11286) https://github.com/vim/vim/commit/0816f473ab2f6cf7d8311c0f97371cada7f20d18
| * fix(options): no matter what is said, 'cmdheight' is tab-local (susy baka)bfredl2022-10-05
| |
| * refactor(redraw): no type argument in update_screen()bfredl2022-10-05
| | | | | | | | | | | | | | | | | | | | This was used in the past with assumption that curwin/curbuf is "special" but this has not been true since basically forever at this point. Reduce NOT_VALID/CLEAR panic in options.lua . These should not be set if an effect of the option is causing something which by itself invokes redraw_later().
| * refactor: replace unnecessary helper functions in optionstr.cFamiu Haque2022-09-28
| | | | | | | | | | | | | | | | | | | | | | | | Replaces unnecessary helper functions in `optionstr.c` such as `get_option_flags()`, `get_option_fullname()`, `set_option_flag()`, `is_global_option()`, etc. with a single `get_option()` helper function that allows direct access to the `options` array. Also refactors `f_exists()` to use `get_varp_scope` instead of using `get_option_tv`. This opens up the path for removing `getoptions_T` altogether later down the line since the hidden option logic is no longer needed.
| * vim-patch:9.0.0544: minor issues with setting a string optionzeertzjq2022-09-22
| | | | | | | | | | | | Problem: Minor issues with setting a string option. Solution: Adjust the code, add a test. (closes vim/vim#11192) https://github.com/vim/vim/commit/fcba86c0316dc0d6341078b50e7967206a1627a0
| * vim-patch:9.0.0540: assigning stack variable to argument confuses Coverityzeertzjq2022-09-22
| | | | | | | | | | | | Problem: Assigning stack variable to argument confuses Coverity. Solution: Use a local pointer, also makes the code simpler. https://github.com/vim/vim/commit/6f98114e4a5db3917c4f9d2fec09e11b4b0d0be5
| * vim-patch:9.0.0537: the do_set() function is much too long (#20274)zeertzjq2022-09-22
| | | | | | | | | | | | | | Problem: The do_set() function is much too long. Solution: Move setting of a string option to a separate function. https://github.com/vim/vim/commit/4740394f230dda09d6e9337465305741d8ee4fa3 Cherry-pick some tests from Vim patch 8.2.0540.
| * vim-patch:8.1.0941: macros for MS-Windows are inconsistent (#20215)dundargoc2022-09-18
| | | | | | | | | | | | | | Problem: Macros for MS-Windows are inconsistent, using "32", "3264 and others. Solution: Use MSWIN for all MS-Windows builds. Use FEAT_GUI_MSWIN for the GUI build. (Hirohito Higashi, closes vim/vim#3932) https://github.com/vim/vim/commit/4f97475d326c2773a78561fb874e4f23c25cbcd9
| * vim-patch:8.2.0690: line number of option set by modeline is wrong (#20228)zeertzjq2022-09-17
| | | | | | | | | | Problem: Line number of option set by modeline is wrong. Solution: Do not double the line number. (Ozaki Kiichi, closes vim/vim#6035) https://github.com/vim/vim/commit/5125874951669944a5f6a4163d6e5d437ae6321e
| * feat(ui): use msg_grid based implementation for cmdheight=0bfredl2022-09-15
| |
| * vim-patch:9.0.0449: there is no easy way to translate a key code into a ↵zeertzjq2022-09-13
| | | | | | | | | | | | | | | | | | | | | | | | | | string (#20168) Problem: There is no easy way to translate a string with a key code into a readable string. Solution: Add the keytrans() function. (closes vim/vim#11114) https://github.com/vim/vim/commit/cdc839353f68ca43db6446e1b727fc7ba657b738 vim-patch:7b2d87220c6c Add missing part of patch https://github.com/vim/vim/commit/7b2d87220c6c974d5cdae672b6f9620a6bcbd1dc
| * refactor: replace char_u with charDundar Göc2022-09-11
| | | | | | | | Work on https://github.com/neovim/neovim/issues/459
| * refactor: replace char_u with charDundar Göc2022-09-10
| | | | | | | | Work on https://github.com/neovim/neovim/issues/459
| * refactor: replace char_u with charDundar Göc2022-09-09
| | | | | | | | Work on https://github.com/neovim/neovim/issues/459
| * refactor: replace char_u with charDundar Göc2022-09-06
| | | | | | | | Work on https://github.com/neovim/neovim/issues/459
| * refactor: migrate comment style (#20012)Lewis Russell2022-09-02
| | | | | | | | | | | | | | | | | | Done automatically using the following perl command: perl -pi -0777pe 's#\n\K */\*\n(.+?)\s*\*/\n#join("\n", map { $_ =~ s:^\s*\K \*://:; $_ } split("\n", $1)) . "\n"#sge' src/nvim/**/*.c Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
| * refactor: replace char_u with charDundar Göc2022-09-01
| | | | | | | | Work on https://github.com/neovim/neovim/issues/459
| * perf(messages): don't call ui_flush() per message line in various placesbfredl2022-09-01
| | | | | | | | | | | | When msgsep is used, message scrolling is emulated. To make message output fast, inhibit emulated scrolling until the full message text is known
| * vim-patch:9.0.0318: clearing screen causes flicker (#19993)zeertzjq2022-08-30
| | | | | | | | | | | | | | Problem: Clearing screen causes flicker. Solution: Do not clear but redraw in more cases. Add () to "wait_return". https://github.com/vim/vim/commit/13608d851a0470ced30921428b3313c023d395d8 Only 2 lines of actual code change.
| * refactor: replace char_u with charDundar Göc2022-08-29
| | | | | | | | Work on https://github.com/neovim/neovim/issues/459
| * refactor: replace char_u with charDundar Göc2022-08-27
| | | | | | | | Work on https://github.com/neovim/neovim/issues/459
| * vim-patch:8.2.1269: language and locale code spread out (#19964)zeertzjq2022-08-27
| | | | | | | | | | | | | | | | Problem: Language and locale code spread out. Solution: Move relevant code to src/locale.c. (Yegappan Lakshmanan, closes vim/vim#6509) https://github.com/vim/vim/commit/054f14bbe58fece17f1a74ca63f0b37518f0b4de Also remove redundant <locale.h> includes.
| * refactor: replace char_u with charDundar Göc2022-08-26
| | | | | | | | Work on https://github.com/neovim/neovim/issues/459
| * vim-patch:8.2.0674: some source files are too big (#19959)zeertzjq2022-08-26
| | | | | | | | | | | | | | | | | | Problem: Some source files are too big. Solution: Move text formatting functions to a new file. (Yegappan Lakshmanan, closes vim/vim#6021) https://github.com/vim/vim/commit/11abd095210fc84e5dcee87b9baed86061caefe4 Cherry-pick set_can_cindent() from patch 8.1.2062. Cherry-pick global old_indent from patch 8.2.2127.
| * vim-patch:8.1.2331: the option.c file is still very big (#19954)zeertzjq2022-08-26
| | | | | | | | | | | | | | | | | | | | | | | | Problem: The option.c file is still very big. Solution: Move a few functions to where they fit better. (Yegappan Lakshmanan, closes vim/vim#4895) https://github.com/vim/vim/commit/7bae0b1bc84a95d565ffab38cf7f82ad21c656b6 vim-patch:9.0.0271: using INIT() in non-header files Problem: Using INIT() in non-header files. Solution: Remove INIT(). (closes vim/vim#10981) https://github.com/vim/vim/commit/9b7d2a959646560f5770329f4428c4739eed4656
| * vim-patch:9.0.0036: 'fillchars' cannot have window-local valueszeertzjq2022-08-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: 'fillchars' cannot have window-local values. Solution: Make 'fillchars' global-local. (closes vim/vim#5206) https://github.com/vim/vim/commit/96ba25ac01279f73c0ecb5d4aa4ff37aa359e5eb Cherry-pick g:run_nr from patch 8.2.0454. N/A patches for version.c: vim-patch:9.0.0037: build error Problem: Build error. Solution: Add missing change. https://github.com/vim/vim/commit/510f03738dfcadfe2099c5b6a58cb75f64dbaa82
| * refactor: replace char_u with charDundar Goc2022-08-25
| | | | | | | | Work on https://github.com/neovim/neovim/issues/459
| * vim-patch:9.0.0206: redraw flags are not named specifically (#19913)zeertzjq2022-08-23
| | | | | | | | | | Problem: Redraw flags are not named specifically. Solution: Prefix "UPD_" to the flags, for UPDate_screen(). https://github.com/vim/vim/commit/a4d158b3c839e96ed98ff87c7b7124ff4518c4ff
| * vim-patch:8.2.4753: error from setting an option is silently ignored (#19888)zeertzjq2022-08-22
| | | | | | | | | | Problem: Error from setting an option is silently ignored. Solution: Handle option value errors better. Fix uses of N_(). https://github.com/vim/vim/commit/31e5c60a682840959cae6273ccadd9aae48c928d
* | feat(userreg): Add user-defined registers to Neovim.Josh Rahm2022-08-21
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change unlocks additional registers for Neovim by allowing a user to define their own behavior for non-builtin registers. This is accopmlished through a new option 'userregfunc' The 'userregfunc' defines the function to call when handling a register for which there is no builtin functionality. The 'userregfunc' function should take 3 arguments: action - Either "yank" or "put" register - The character corresponding to the register content - In the case of action == "yank", the dictionary describing the yanked content, with the following keys: {type} - Either "char", "line" or "block" {lines} - The lines being yanked as a list {width} - The width in case of "block" mode. {additional_data} - Additional data (can be returned in "put" mode) In case of "put" this function should return the content to put. This content can be either: * A dictionary in the same template as content above. * A list of strings. This will be assumed to be "line" mode. * A string. This will be assumed to be "char" mode. An example of a "null" 'userregfunc' that provides an implementation identical to traditional vim registers would be: let s:contents = {} function! MyUserregFunction(action, register, content) abort if a:action == "put" return get(s:contents, a:register, "") else let s:contents[a:register] = a:content endif endfunction set userregfun=MyUserregFunction It is important to note that any valid unicode character can now be a register, including something like @☺. This change also addresses the multibyte parsing issues surrounding let @a = 'xyz' let @🔨 = 'hammer'
* vim-patch:8.1.2045: the option.c file is too big (#19854)zeertzjq2022-08-20
| | | | | | | | | | | Problem: The option.c file is too big. Solution: Split off the code dealing with strings. (Yegappan Lakshmanan, closes vim/vim#4937) https://github.com/vim/vim/commit/dac1347b4d9c1a1aef6aa73fdea08a9d1077d6ea Cherry-pick set_string_option_direct_in_win() from patch 8.1.1405. Cherry-pick shift_line() comment change from patch 8.1.2096. Move 'clipboard' default parsing to didset_string_options(). Reorder option flags to put Nvim-only flags at the end.
* vim-patch:8.2.3619: cannot use a lambda for 'operatorfunc' (#19846)zeertzjq2022-08-20
| | | | | | | | | | Problem: Cannot use a lambda for 'operatorfunc'. Solution: Support using a lambda or partial. (Yegappan Lakshmanan, closes vim/vim#8775) https://github.com/vim/vim/commit/777175b0df8c5ec3cd30d19a2e887e661ac209c8 Omit duplicate docs. It's removed in patch 8.2.3623. Nvim doesn't seem to need callback_set() as it was omitted when patch 8.1.1437 was first ported.
* 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