aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/change.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/change.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/change.c')
-rw-r--r--src/nvim/change.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/change.c b/src/nvim/change.c
index f3a8e0b208..faaae96af9 100644
--- a/src/nvim/change.c
+++ b/src/nvim/change.c
@@ -914,7 +914,7 @@ int del_bytes(colnr_T count, bool fixpos_arg, bool use_delcombine)
// fixpos is true, we don't want to end up positioned at the NUL,
// unless "restart_edit" is set or 'virtualedit' contains "onemore".
if (col > 0 && fixpos && restart_edit == 0
- && (get_ve_flags(curwin) & VE_ONEMORE) == 0) {
+ && (get_ve_flags(curwin) & kOptVeFlagOnemore) == 0) {
curwin->w_cursor.col--;
curwin->w_cursor.coladd = 0;
curwin->w_cursor.col -= utf_head_off(oldp, oldp + curwin->w_cursor.col);