Lewis Russell
18c37c616e
refactor(option.c): factor out common skip check
2023-01-26 09:52:22 +00:00
Lewis Russell
9679d058d4
refactor(option.c): simplify do_set_string
2023-01-26 09:51:45 +00:00
Lewis Russell
ca1ad8977c
refactor(option.c): add do_set_bool
2023-01-26 09:51:45 +00:00
Lewis Russell
37b44d1772
refactor(option.c): add do_set_num
2023-01-26 09:51:43 +00:00
Lewis Russell
e2a9d71521
Merge pull request #21885 from lewis6991/refactor/options
...
Problems:
- Scope of local variables in options code is too large.
- did_set_string_option() is too large (>1000LOC).
- Setting options for a particular window or buffer requires a changing context (assigning curwin/curbuf).
Solutions:
- Reduce the scope of local variables.
- Break up did_set_string_option so it doesn't contain specific logic about each individual option (1038 LOC -> 310 LOC).
- Begin work on making functions not depend on curbuf or curwin and pass window or buffer handles explicitly.
2023-01-25 13:46:23 +00:00
Lewis Russell
7bee622fdc
refactor(optionstr.c): move handling of formatlistpat
2023-01-25 12:17:38 +00:00
Lewis Russell
15499fa856
refactor(optionstr.c): break up did_set_expropt
2023-01-25 12:13:06 +00:00
Lewis Russell
f37ec6026f
refactor(optionstr.c): remove some redundant parens
2023-01-25 11:48:55 +00:00
Lewis Russell
b278e0740e
refactor(optionstr.c): break up did_option_listflags
2023-01-25 11:48:55 +00:00
Lewis Russell
38ed432164
refactor(optionstr.c): add did_set_string_option_for
2023-01-25 11:48:55 +00:00
Lewis Russell
414e71fa4f
refactor(optionstr.c): break up did_set_string_option 52
2023-01-25 11:48:53 +00:00
Lewis Russell
0012ed2bc7
refactor(optionstr.c): break up did_set_string_option 51
2023-01-25 11:48:53 +00:00
Lewis Russell
2654a9e9d8
refactor(optionstr.c): remove some simple did_set_* functions 2
2023-01-25 11:48:53 +00:00
Lewis Russell
e5234d48ed
refactor(optionstr.c): remove some simple did_set_* functions
2023-01-25 11:48:53 +00:00
Lewis Russell
c6e7abb583
refactor(optionstr.c): break up did_set_string_option 50
2023-01-25 11:48:53 +00:00
Lewis Russell
6dac70bbfe
refactor(optionstr.c): break up did_set_string_option 49
2023-01-25 11:48:53 +00:00
Lewis Russell
01e51d3bd1
refactor(optionstr.c): break up did_set_string_option 48
2023-01-25 11:48:53 +00:00
Lewis Russell
f1ac5aec23
refactor(optionstr.c): break up did_set_string_option 47
2023-01-25 11:48:53 +00:00
Lewis Russell
cb1e5ddbfb
refactor(optionstr.c): break up did_set_string_option 46
2023-01-25 11:48:52 +00:00
Lewis Russell
e0954f676a
refactor(optionstr.c): break up did_set_string_option 45
2023-01-25 11:48:52 +00:00
Lewis Russell
a026cf0d94
refactor(optionstr.c): break up did_set_string_option 44
2023-01-25 11:48:52 +00:00
Lewis Russell
d59349de7b
refactor(optionstr.c): break up did_set_string_option 43
2023-01-25 11:48:52 +00:00
Lewis Russell
99910c7382
refactor(optionstr.c): break up did_set_string_option 42
2023-01-25 11:48:52 +00:00
Lewis Russell
2a83a5077d
refactor(optionstr.c): break up did_set_string_option 41
2023-01-25 11:48:52 +00:00
Lewis Russell
a84bc3817a
refactor(optionstr.c): break up did_set_string_option 40
2023-01-25 11:48:52 +00:00
Lewis Russell
902b89ad4b
refactor(optionstr.c): break up did_set_string_option 39
2023-01-25 11:48:52 +00:00
Lewis Russell
4c365548a2
refactor(optionstr.c): break up did_set_string_option 38
2023-01-25 11:48:52 +00:00
Lewis Russell
3ea6a45a12
refactor(optionstr.c): break up did_set_string_option 37
2023-01-25 11:48:52 +00:00
Lewis Russell
bc2c9b1a08
refactor(optionstr.c): break up did_set_string_option 36
2023-01-25 11:48:52 +00:00
Lewis Russell
6d701cf772
refactor(optionstr.c): break up did_set_string_option 35
2023-01-25 11:48:52 +00:00
Lewis Russell
47544b6255
refactor(optionstr.c): break up did_set_string_option 34
2023-01-25 11:48:52 +00:00
Lewis Russell
b693d65171
refactor(optionstr.c): break up did_set_string_option 33
2023-01-25 11:48:52 +00:00
Lewis Russell
8ef464aeb4
refactor(optionstr.c): break up did_set_string_option 32
2023-01-25 11:48:52 +00:00
Lewis Russell
0522dc35af
refactor(optionstr.c): break up did_set_string_option 31
2023-01-25 11:48:52 +00:00
Lewis Russell
59746d228e
refactor(optionstr.c): break up did_set_string_option 30
2023-01-25 11:48:52 +00:00
Lewis Russell
5024ac8eb5
refactor(optionstr.c): break up did_set_string_option 29
2023-01-25 11:48:52 +00:00
Lewis Russell
655292586a
refactor(optionstr.c): break up did_set_string_option 28
2023-01-25 11:48:52 +00:00
Lewis Russell
f9e15db27d
refactor(optionstr.c): break up did_set_string_option 27
2023-01-25 11:48:52 +00:00
Lewis Russell
700a02bd83
refactor(optionstr.c): break up did_set_string_option 26
2023-01-25 11:48:52 +00:00
Lewis Russell
7fa7c758e2
refactor(optionstr.c): break up did_set_string_option 25
2023-01-25 11:48:52 +00:00
Lewis Russell
12d065dceb
refactor(optionstr.c): break up did_set_string_option 24
2023-01-25 11:48:52 +00:00
Lewis Russell
3fbc5f9860
refactor(optionstr.c): break up did_set_string_option 23
2023-01-25 11:48:52 +00:00
Lewis Russell
ccaed94475
refactor(optionstr.c): break up did_set_string_option 22
2023-01-25 11:48:52 +00:00
Lewis Russell
6dc62f2fe2
refactor(optionstr.c): break up did_set_string_option 21
2023-01-25 11:48:52 +00:00
Lewis Russell
2cea568a7c
refactor(optionstr.c): break up did_set_string_option 20
2023-01-25 11:48:52 +00:00
Lewis Russell
c2fa39e026
refactor(optionstr.c): break up did_set_string_option 19
2023-01-25 11:48:52 +00:00
Lewis Russell
fec41d5f15
refactor(optionstr.c): break up did_set_string_option 18
2023-01-25 11:48:52 +00:00
Lewis Russell
fca3053a3e
refactor(optionstr.c): break up did_set_string_option 17
2023-01-25 11:48:52 +00:00
Lewis Russell
5adf8f9276
refactor(optionstr.c): break up did_set_string_option 16
2023-01-25 11:48:52 +00:00
Lewis Russell
db6461b6ad
refactor(optionstr.c): break up did_set_string_option 15
2023-01-25 11:48:52 +00:00