| Commit message (Collapse) | Author | Age |
... | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: screenpos() may return invalid position
after switching buffers (Greg Hurrell)
Solution: reset w_leftcol if wrapping has been set
after copying wrap option
fixes: vim/vim#15792
closes: vim/vim#15803
https://github.com/vim/vim/commit/b065a10e245d020c11b521a2a5062300ca9891fc
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: it's possible to set an invalid key to 'wildcharm'
Solution: error out, if the 'wildcharm' value is an invalid key
(Milly)
closes: vim/vim#15787
https://github.com/vim/vim/commit/40c6babc1789aceb241b23bab76eea16da37e33d
Co-authored-by: Milly <milly.ca@gmail.com>
|
| |
| |
| |
| |
| | |
Co-authored-by: Christian Clason <c.clason@uni-graz.at>
Co-authored-by: Riley Bruins <ribru17@hotmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In the api_info() output:
:new|put =map(filter(api_info().functions, '!has_key(v:val,''deprecated_since'')'), 'v:val')
...
{'return_type': 'ArrayOf(Integer, 2)', 'name': 'nvim_win_get_position', 'method': v:true, 'parameters': [['Window', 'window']], 'since': 1}
The `ArrayOf(Integer, 2)` return type didn't break clients when we added
it, which is evidence that clients don't use the `return_type` field,
thus renaming Dictionary => Dict in api_info() is not (in practice)
a breaking change.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: too many strlen() calls in option.c
Solution: refactor the code to reduce the number of strlen() calls
(John Marriott)
closes: vim/vim#15604
https://github.com/vim/vim/commit/95dacbb5fd53f76a7e369c554aaa02e86b81eca8
Co-authored-by: John Marriott <basilisk@internode.on.net>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
`'scrollbind'` does not work properly if the window being scrolled
automatically contains any filler/virtual lines (except for diff filler
lines).
This is because when the scrollbind check is done, the logic only
considers changes to topline which are represented as line numbers.
Solution:
Write the logic for determine the scroll amount to take into account
filler/virtual lines.
Fixes #29751
|
| |
| |
| |
| |
| | |
revert: "refactor: use S_LEN(s) instead of s, n (#29219)"
This reverts commit c37695a5d5f2e8914fff86f3581bed70b4c85d3c.
|
| |\
| | |
| | | |
refactor(memory): use builtin strcat() instead of STRCAT()
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The latter was mostly relevant with the past char_u madness.
NOTE: STRCAT also functioned as a counterfeit "NOLINT" for clint
apparently. But NOLINT-ing every usecase is just the same as disabling
the check entirely.
|
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Inconsistencies between functions for option flags.
Solution: Consistently use "unsigned int" as return type and rename
get_bkc_value() to get_bkc_flags() (zeertzjq).
closes: vim/vim#14925
https://github.com/vim/vim/commit/aa925eeb97bd294d4a5253a3194949a37cbc8365
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Cannot have buffer-local value for 'completeopt'
(Nick Jensen).
Solution: Make 'completeopt' global-local (zeertzjq).
Also for some reason test Test_ColonEight_MultiByte seems to be failing
sporadically now. Let's mark it as flaky.
fixes: vim/vim#5487
closes: vim/vim#14922
https://github.com/vim/vim/commit/529b9ad62a0e843ee56ef609aef7e51b7dc8a4c8
|
| | |
|
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
other buf (#28136)
Problem: Filetype may be undetected when a SwapExists autocommand sets
filetype in another buffer.
Solution: Make filetype detection state buffer-specific. Also fix a
similar problem for 'modified' (zeertzjq).
closes: vim/vim#14344
https://github.com/vim/vim/commit/5bf6c2117fcef85fcf046c098dd3eb72a0147859
|
| |
| |
| |
| | |
Ref: https://github.com/neovim/neovim/pull/28018#issuecomment-2021622120
|
| |
| |
| |
| |
| |
| | |
Problem: Currently, the `immutable` property of options can be applied for options that are hidden and options whose value simply can't be changed. Which is problematic when attempting to convert an option like `'maxcombine'` into an immutable option, because trying to `:set` an immutable option currently gives an error, which is only desired behavior for hidden options, not options that are actually immutable.
Solution: Separate the `immutable` property into two distinct `hidden` and `immutable` properties. Change all options with the `immutable` property to use the `hidden` property instead. Also add `p_mco` as an `immutable` option, as its value cannot be changed, and the underlying variable is not used anywhere.
|
| |
| |
| |
| |
| |
| | |
Problem: `set_string_option_direct()` contains a separate codepath specifically for setting string options. Not only is that unnecessary code duplication, but it's also limited to only string options.
Solution: Replace `set_string_option_direct()` with `set_option_direct()` which calls `set_option()` under the hood. This reduces code duplication and allows directly setting an option of any type.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A lot of functions in move.c only worked for curwin, alternatively
took a `wp` arg but still only work if that happens to be curwin.
Refactor those that are needed for update_topline(wp) to work
for any window.
fixes #27723
fixes #27720
|
| |
| |
| |
| |
| |
| |
| | |
Problem: Arbitrary restriction on 'cmdheight' with ext_messages.
The 'cmdheight'-area may be desirable for the replacing
cmdline.
Solution: Allow non-zero 'cmdheight' with ext_messages.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Cannot keep a buffer focused in a window
(Amit Levy)
Solution: Add the 'winfixbuf' window-local option
(Colin Kennedy)
fixes: vim/vim#6445
closes: vim/vim#13903
https://github.com/vim/vim/commit/215703563757a4464907ead6fb9edaeb7f430bea
N/A patch:
vim-patch:58f1e5c0893a
|
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Setting some options changes curswant unnecessarily.
Solution: Add a P_HLONLY flag that prevents changing curswant.
(zeertzjq)
closes: vim/vim#14044
https://github.com/vim/vim/commit/fcaed6a70faf73bff3e5405ada556d726024f866
|
| |
| |
| | |
Follows up on rename of `FloatConfig` to `WinConfig` in #27397.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: did_set_breakat() should be in optionstr.c as 'breakat' is a
string option.
Solution: Move did_set_breakat() to optionstr.c.
(zeertzjq)
closes: vim/vim#13958
https://github.com/vim/vim/commit/eac3fdcfa0b54281c37ffb66b4d4e8d1072cca1c
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
APIs get wrong boolean option default values on big-endian platforms.
Solution:
Use a union for def_val.
Cannot use OptVal or OptValData yet as it needs to have the same types
as option variables.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: too vague errors for 'listchars'/'fillchars'
Solution: Include the field name in error message.
(zeertzjq)
related: #27050
closes: vim/vim#13877
https://github.com/vim/vim/commit/6a8d2e1634f8f0d7463a2786dbcbe0f38dd287a7
Co-authored-by: Cole Frankenhoff <cole.nhf@gmail.com>
|
| |
| |
| |
| |
| |
| | |
Remove `export` pramgas from defs headers as it causes IWYU to believe
that the definitions from the defs headers comes from main header, which
is not what we really want.
|
| |
| |
| |
| |
| |
| | |
Problem: `OPT_FREE` macro doesn't seem to do anything as `P_ALLOCED`
already handles allocations.
Solution: Remove `OPT_FREE`.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A bit big, but practically it was a lot simpler to change over all
fillchars and all listchars at once, to not need to maintain two
parallel implementations.
This is mostly an internal refactor, but it also removes an arbitrary
limitation: that 'fillchars' and 'listchars' values can only be
single-codepoint characters. Now any character which fits into a single
screen cell can be used.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Keymap completion is not available
Solution: Add keymap completion (Doug Kearns)
Add keymap completion to the 'keymap' option, user commands and builtin
completion functions.
closes: vim/vim#13692
https://github.com/vim/vim/commit/81642d9d6ff5cd6a90a012b1b98632ce51eeb1a8
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
|
| | |
|
| | |
|
| |\
| | |
| | | |
refactor(options): miscellanous refactors
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| |/
| |
| |
| | |
Instead replace them with fprintf and printf.
|
| |
| |
| |
| |
| | |
"export" only prevents IWYU from adding these headers if the headers
that export them are included, while "private" ensures that IWYU never
adds these headers.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
`findoption()` searches through the options[] table linearly for option
names, even though hashy can be used to generate a compile-time hash
table for it.
Solution:
Use hashy to generate a compile time hash table for finding options.
This also allows handling option aliases, so we don't need separate
options[] table entries for things like 'viminfo'.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: We have `P_(BOOL|NUM|STRING)` macros to represent an option's type, which is redundant because `OptValType` can already do that. The current implementation of option type flags is also too limited to allow adding multitype options in the future.
Solution: Remove `P_(BOOL|NUM|STRING)` and replace it with a new `type_flags` attribute in `vimoption_T`. Also do some groundwork for adding multitype options in the future.
Side-effects: Attempting to set an invalid keycode option (e.g. `set t_foo=123`) no longer gives an error.
|
| |
| |
| |
| | |
Add a macro to indicate the option count so that we can iterate through the options[] table more clearly. This also removes the need for having an option with NULL fullname at the end of `options[]`.
|