aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/option.c
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2022-01-28 15:42:19 +0100
committerBjörn Linse <bjorn.linse@gmail.com>2022-01-29 19:49:37 +0100
commitbaec0d3152afeab3007ebb505f3fc274511db434 (patch)
tree7a6401825cf208ba9aaa21cbe053effd71077a0e /src/nvim/option.c
parentb2f77c354a289ac99de4c28425dc39d7d057cf90 (diff)
downloadrneovim-baec0d3152afeab3007ebb505f3fc274511db434.tar.gz
rneovim-baec0d3152afeab3007ebb505f3fc274511db434.tar.bz2
rneovim-baec0d3152afeab3007ebb505f3fc274511db434.zip
feat(provider)!: remove support for python2 and python3.[3-5]
These versions of python has reached End-of-life. getting rid of python2 support removes a lot of logic to support two incompatible python versions in the same version.
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r--src/nvim/option.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c
index a4a6423ac7..2fb1966cda 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -4349,6 +4349,12 @@ static char *set_num_option(int opt_idx, char_u *varp, long value, char *errbuf,
} else if (value > 10000) {
errmsg = e_invarg;
}
+ } else if (pp == &p_pyx) {
+ if (value == 0) {
+ value = 3;
+ } else if (value != 3) {
+ errmsg = e_invarg;
+ }
} else if (pp == &p_re) {
if (value < 0 || value > 2) {
errmsg = e_invarg;
@@ -4523,10 +4529,6 @@ static char *set_num_option(int opt_idx, char_u *varp, long value, char *errbuf,
if (pum_drawn()) {
pum_redraw();
}
- } else if (pp == &p_pyx) {
- if (p_pyx != 0 && p_pyx != 2 && p_pyx != 3) {
- errmsg = e_invarg;
- }
} else if (pp == &p_ul || pp == &curbuf->b_p_ul) {
// sync undo before 'undolevels' changes
// use the old value, otherwise u_sync() may not work properly