| Commit message (Collapse) | Author | Age |
... | |
| |
| |
| |
| |
| |
| | |
- Move vimoption_T to option.h
- option_defs.h is for option-related types
- option_vars.h corresponds to Vim's option.h
- option_defs.h and option_vars.h don't include each other
|
| | |
|
| |
| |
| |
| |
| | |
long is 32-bits even on 64-bit windows which makes the type suboptimal
for a codebase meant to be cross-platform.
|
| |
| |
| |
| |
| | |
problem: there are too many different functions in message.c
solution: fold some of the functions into themselves
|
| |
| |
| |
| |
| | |
problem: there are too many different functions in message.c
solution: fold some of the functions into themselves
|
| |\
| | |
| | | |
fix(highlight): winhl receive wrong argument
|
| | | |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Cannot use an import in 'foldexpr'.
Solution: Set the script context to where 'foldexpr' was set. (closes vim/vim#9584)
Fix that the script context was not set for all buffers.
https://github.com/vim/vim/commit/e70dd11ef41f69bd5e94f630194e6b3c4f3f2102
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
set_option_value() only called did_set_option() for string options,
whereas do_set_option_value() called it for all types.
This change makes set_option_value() call did_set_option() for all types
and thus makes it more consistent with do_set_option_value().
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: The 'syntax' option has no completion.
Solution: Add syntax option completion.
closes: vim/vim#12900
https://github.com/vim/vim/commit/6dfdff3f273dcea29099d81e3eceb871ae089998
N/A patches:
vim-patch:9.0.1795: Indentation issues
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Problems when setting bin/paste option
Solution: When setting binary/paste, remember that this also affects
depending options, so that :verbose set returns the right
location.
Mention if depending options for 'binary' or 'paste' have been reset
indirectly. Add a test to verify it works.
Also noticed as small bug, that the global option value for expandtab
was not reset when paste option is set, so fix that while at it.
closes: vim/vim#12837
closes: vim/vim#12879
https://github.com/vim/vim/commit/757593c07a4f4ac43eb6c6e52fc299abc9bc08bc
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: sidescrolloff and scrolloff options work slightly
different than other global-local options
Solution: Make it behave consistent for all global-local options
It was noticed, that sidescrolloff and scrolloff options behave
differently in comparison to other global-local window options like
'listchars'
So make those two behave like other global-local options. Also add some
extra documentation for a few special local-window options.
Add a few tests to make sure all global-local window options behave
similar
closes: vim/vim#12956
closes: vim/vim#12643
https://github.com/vim/vim/commit/4a8eb6e7a9df10f79bf95301ced012f0d6a13088
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
long is 32-bits even on 64-bit windows which makes the type suboptimal
for a codebase meant to be cross-platform.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
(#24185)
Problem: Resetting local option to global value is inconsistent.
Solution: Handle "<" specifically for 'scrolloff' and 'sidescrolloff'.
(closes vim/vim#12594)
https://github.com/vim/vim/commit/bf5f189e449d6517239b79804d7a422a46946838
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| | |
Option related code uses `char *` for pointer to option value, which is not the best way of representing a type-agnostic pointer.
Solution: Make pointers to option value use `void *` instead.
|
| |
| |
| |
| |
| |
| |
| |
| | |
errors (#24026)
Problem: Passing a wrong variable type to an option gives multiple errors.
Solution: Bail out early on failure. (closes vim/vim#12504)
https://github.com/vim/vim/commit/4c7cb372c17a84c8a35254d93eb37cb854cd39da
|
| |
| |
| |
| |
| |
| | |
`option_get_valid_types()` currently uses a comma separator for
multi-type options which does not fit well with the changed error
message for invalid option value type. A slash seperator is much more
suited for its current use-case.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Removes the `getoption_T` struct and also introduces the `OptVal` struct
to unify the methods of getting/setting different option value types.
This is the first of many PRs to reduce code duplication in the Vim
option code as well as to make options easier to maintain. It also
increases the flexibility and extensibility of options. Which opens the
door for things like Array and Dictionary options.
|
| |
| |
| | |
Remove redundant `BOOL` macro that does the same thing as `BOOLEAN_OBJ`.
|
| | |
|
| |
| |
| |
| | |
Adds new API helper macros `CSTR_AS_OBJ()`, `STATIC_CSTR_AS_OBJ()`, and `STATIC_CSTR_TO_OBJ()`, which cleans up a lot of the current code. These macros will also be used extensively in the upcoming option refactor PRs because then API Objects will be used to get/set options. This PR also modifies pre-existing code to use old API helper macros like `CSTR_TO_OBJ()` to make them cleaner.
|
| |
| |
| |
| |
| | |
Replace usage of STR{CPY,CAT} with xstrl{cpy,cat} when using on IObuff
Co-authored-by: ii14 <ii14@users.noreply.github.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
(#23518)
Problem: Completion for option name includes all bool options.
Solution: Do not recognize the "noinv" prefix. Prefix "no" or "inv" when
appropriate.
https://github.com/vim/vim/commit/048d9d25214049dfde04c468c14bd1708fb692b8
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: 'smoothscroll' is not copied to a new window on :split.
Solution: Copy the option value. Add a test.
https://github.com/vim/vim/commit/b1fd26d208aadc96d3e8b9215f761150f40a9f91
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Cannot scroll by screen line if a line wraps.
Solution: Add the 'smoothscroll' option. Only works for CTRL-E and CTRL-Y
so far.
https://github.com/vim/vim/commit/f6196f424474e2a9c160f2a995fc2691f82b58f9
vim-patch:9.0.0641: missing part of the new option code
Problem: Missing part of the new option code.
Solution: Add missing WV_SMS.
https://github.com/vim/vim/commit/bbbda8fd81f6d720962b67ae885825bad9be4456
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Still some "else if" constructs for setting options.
Solution: Add a few more functions for handling options. (Yegappan
Lakshmanan, closes vim/vim#12090)
https://github.com/vim/vim/commit/c6ff21e876af0e3ad59664dd0f69359c4b6e9f1d
|
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Too many "else if" statements to handle option values.
Solution: Add more functions to handle option value changes. (Yegappan
Lakshmanan, closes vim/vim#12058)
https://github.com/vim/vim/commit/6d611de58c8e324491415da8e79c6bd3faa3e848
|
| |
| |
| |
| |
| |
| |
| | |
Problem: Handling new value of an option has a long "else if" chain.
Solution: Use a function pointer. (Yegappan Lakshmanan, closes vim/vim#12015)
https://github.com/vim/vim/commit/af93691b53f38784efce0b93fe7644c44a7e382e
|
| |
| |
| |
| | |
Notable changes: replace all infinite loops to `while(true)` and remove
`int` from `unsigned int`.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: 'statuscolumn' width may be reset after it has been drawn
when multiple windows contain the same buffer. This results
in an offset for the drawn cursor position.
Solution: Loop over all windows (twice) prior to drawing them to
reset the 'statuscolumn' width and validate the sign
column when necessary.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Coverity warns for using a NULL pointer.
Solution: Use "empty_option" instead of NULL.
https://github.com/vim/vim/commit/339e114d70de3ec2b36edf37d7ba7a7cfdf9d1a6
N/A patches for version.c:
vim-patch:9.0.1405: missing check for out-of-memory
Problem: Missing check for out-of-memory.
Solution: Check for alloc() returning NULL pointer. (closes vim/vim#12149)
https://github.com/vim/vim/commit/14338024c131b71a337c2bb87cb5904f5a5782b8
|
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: The code for setting options is too complicated.
Solution: Refactor the code for setting options. (Yegappan Lakshmanan,
closes vim/vim#11989)
https://github.com/vim/vim/commit/1a6476428f63e9fa0c2cbea296e475e60363af11
|
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: The set_num_option() is too long.
Solution: Move code to separate functions. (Yegappan Lakshmanan,
closes vim/vim#11954)
https://github.com/vim/vim/commit/0caaf1e46511f7a92e036f05e6aa9d5992540117
|