aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/diff.c
diff options
context:
space:
mode:
authorFamiu Haque <famiuhaque@proton.me>2024-11-23 14:22:06 +0600
committerGitHub <noreply@github.com>2024-11-23 08:22:06 +0000
commit8516c2dc1f301c439695629fff771227dbe00d30 (patch)
tree5e052ad234f99cdbfce89b03ba71796a8cd274ef /src/nvim/diff.c
parent9a681ad09e2add96d47bf3f39cca8029f3bf09df (diff)
downloadrneovim-8516c2dc1f301c439695629fff771227dbe00d30.tar.gz
rneovim-8516c2dc1f301c439695629fff771227dbe00d30.tar.bz2
rneovim-8516c2dc1f301c439695629fff771227dbe00d30.zip
refactor(options): autogenerate valid values and flag enums for options (#31089)
Problem: Option metadata like list of valid values for an option and option flags are not listed in the `options.lua` file and are instead manually defined in C, which means option metadata is split between several places. Solution: Put metadata such as list of valid values for an option and option flags in `options.lua`, and autogenerate the corresponding C variables and enums. Supersedes #28659 Co-authored-by: glepnir <glephunter@gmail.com>
Diffstat (limited to 'src/nvim/diff.c')
-rw-r--r--src/nvim/diff.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/diff.c b/src/nvim/diff.c
index f1dd08f0e6..20f93049c1 100644
--- a/src/nvim/diff.c
+++ b/src/nvim/diff.c
@@ -2417,7 +2417,7 @@ int diffopt_changed(void)
char *p = p_dip;
while (*p != NUL) {
- // Note: Keep this in sync with p_dip_values
+ // Note: Keep this in sync with opt_dip_values.
if (strncmp(p, "filler", 6) == 0) {
p += 6;
diff_flags_new |= DIFF_FILLER;
@@ -2464,7 +2464,7 @@ int diffopt_changed(void)
p += 8;
diff_flags_new |= DIFF_INTERNAL;
} else if (strncmp(p, "algorithm:", 10) == 0) {
- // Note: Keep this in sync with p_dip_algorithm_values.
+ // Note: Keep this in sync with opt_dip_algorithm_values.
p += 10;
if (strncmp(p, "myers", 5) == 0) {
p += 5;
@@ -2745,7 +2745,7 @@ bool diff_infold(win_T *wp, linenr_T lnum)
void nv_diffgetput(bool put, size_t count)
{
if (bt_prompt(curbuf)) {
- vim_beep(BO_OPER);
+ vim_beep(kOptBoFlagOperator);
return;
}