Skip to content

Commit 6d11347

Browse files
ychinzeertzjq
authored andcommitted
patch 9.0.1973: Clean up cmdline option completion code
Problem: Clean up cmdline option completion code Solution: Fix various minor problems - Fix manual array size calculations to just use `ARRAY_LENGTH()`. - Fix unintentional typo in comments due to copy-paste error. - Fix assert_equal() usages to pass the expected value to first parameter instead of 2nd one to avoid confusion. - Fix signed vs unsigned warnings - Correct misplaced comments about set_op_T and set_prefix_T and fix a typo in another comment closes: #13249 closes: #13237 Signed-off-by: Christian Brabandt <[email protected]> Co-authored-by: Yee Cheng Chin <[email protected]> Co-authored-by: zeertzjq <[email protected]>
1 parent 4a1ad55 commit 6d11347

6 files changed

Lines changed: 176 additions & 171 deletions

File tree

src/move.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3587,7 +3587,7 @@ do_check_cursorbind(void)
35873587
FOR_ALL_WINDOWS(curwin)
35883588
{
35893589
curbuf = curwin->w_buffer;
3590-
// skip original window and windows with 'noscrollbind'
3590+
// skip original window and windows with 'nocursorbind'
35913591
if (curwin != old_curwin && curwin->w_p_crb)
35923592
{
35933593
# ifdef FEAT_DIFF

src/option.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1312,7 +1312,7 @@ ex_set(exarg_T *eap)
13121312
}
13131313

13141314
/*
1315-
* :set operator types
1315+
* :set boolean option prefix
13161316
*/
13171317
typedef enum {
13181318
PREFIX_NO = 0, // "no" prefix
@@ -1830,7 +1830,7 @@ stropt_get_newval(
18301830
&(options[opt_idx]), OPT_GLOBAL));
18311831
else
18321832
{
1833-
++arg; // joption_value2stringump to after the '=' or ':'
1833+
++arg; // jump to after the '=' or ':'
18341834

18351835
// Set 'keywordprg' to ":help" if an empty
18361836
// value was passed to :set by the user.
@@ -7991,7 +7991,7 @@ ExpandSettingSubtract(
79917991
return FAIL;
79927992
}
79937993

7994-
int num_flags = STRLEN(option_val);
7994+
size_t num_flags = STRLEN(option_val);
79957995
if (num_flags == 0)
79967996
return FAIL;
79977997

0 commit comments

Comments
 (0)