vim-patch:9.0.1973: Clean up cmdline option completion code (#25477)

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: vim/vim#13249
closes: vim/vim#13237

6d11347260

N/A patch:
vim-patch:9.0.1976: style: space before tab in optionstr.c

Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
This commit is contained in:
zeertzjq
2023-10-03 07:45:37 +08:00
committed by GitHub
parent 1101cfeb34
commit bd8550ddca
3 changed files with 103 additions and 102 deletions

View File

@@ -137,6 +137,7 @@ static char *p_vsts_nopaste;
#define OPTION_COUNT ARRAY_SIZE(options)
/// :set boolean option prefix
typedef enum {
PREFIX_NO = 0, ///< "no" prefix
PREFIX_NONE, ///< no prefix