aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/options.c
Commit message (Collapse)AuthorAge
* vim-patch:8.1.2001: some source files are too big (#21231)zeertzjq2022-11-29
| | | | | | | Problem: Some source files are too big. Solution: Move buffer and window related functions to evalbuffer.c and evalwindow.c. (Yegappan Lakshmanan, closes vim/vim#4898) https://github.com/vim/vim/commit/261f346f8154c0ec7094a4a211c653c74e9f7c2e
* build: allow IWYU to fix includes for all .c filesdundargoc2022-11-15
| | | | | | | | | | Allow Include What You Use to remove unnecessary includes and only include what is necessary. This helps with reducing compilation times and makes it easier to visualise which dependencies are actually required. Work on https://github.com/neovim/neovim/issues/549, but doesn't close it since this only works fully for .c files and not headers.
* feat(lua-api): avoid unnecessary allocations (#19877)Lewis Russell2022-11-14
| | | | Lua makes (or reuses) an internal copy of strings, so we can safely push buf pointers onto the stack.
* vim-patch:8.2.3751: cannot assign a lambda to an option that takes a functionzeertzjq2022-11-07
| | | | | | | | | | Problem: Cannot assign a lambda to an option that takes a function. Solution: Automatically convert the lambda to a string. (Yegappan Lakshmanan, closes vim/vim#9286) https://github.com/vim/vim/commit/6409553b6e3b4de4e1d72b8ee5445595214581ff Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* fix(docs): invalid :help links #20345Justin M. Keyes2022-09-25
| | | | | Fix those naughty single quotes. closes #20159
* docs: fix typos (#19024)dundargoc2022-07-31
| | | | Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: Valery Viktorovsky <viktorovsky@gmail.com>
* 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
* fix(api): do not switch win/buf if getting option in current win/buf (#19383)zeertzjq2022-07-16
|
* 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.
* | fix(api): check error after getting win/buf handle (#19052)Gregory Anders2022-06-22
|/
* refactor(option): DRY get/set option value #19038Lewis Russell2022-06-21
| | | | | | | | The main motivation for this is for the buf and win cases which need to set up and restore context, and it's what specifically makes the semantics of options nuanced, and thus this should not be repeated more than once. - nvim_get/set_option_value now share argument validation.
* feat(api): add "buf" and "win" to nvim_get_option_valueGregory Anders2022-06-20
| | | | These mirror their counterparts in nvim_set_option_value.
* refactor(api): move option code to own filebfredl2022-06-12