refactor(options): option flags enum #30961

Problem: Currently we use macros with hardcoded flag values for option flags, which is messy and requires a lot of mental math for adding / removing option flags. Using macros for option flags also means that they cannot be used inside debuggers.

Solution: Create a new `OptFlags` enum that stores all the option flags in an organized way that is easier to understand.
This commit is contained in:
Famiu Haque
2024-10-28 19:49:16 +06:00
committed by GitHub
parent 0b7cc014fc
commit 34c44c3556
8 changed files with 144 additions and 150 deletions

View File

@@ -1350,7 +1350,7 @@ char *addstar(char *fname, size_t len, int context)
/// it.
/// EXPAND_BUFFERS Complete file names for :buf and :sbuf commands.
/// EXPAND_FILES After command with EX_XFILE set, or after setting
/// with P_EXPAND set. eg :e ^I, :w>>^I
/// with kOptFlagExpand set. eg :e ^I, :w>>^I
/// EXPAND_DIRECTORIES In some cases this is used instead of the latter
/// when we know only directories are of interest.
/// E.g. :set dir=^I and :cd ^I