Mercurial > vim
comparison src/option.c @ 30825:c7983f593fa7 v9.0.0747
patch 9.0.0747: too many #ifdefs
Commit: https://github.com/vim/vim/commit/ba43e76fcd5b2da57dbaa4d9a555793fe8ac344e
Author: Martin Tournoij <martin@arp242.net>
Date: Thu Oct 13 22:12:15 2022 +0100
patch 9.0.0747: too many #ifdefs
Problem: Too many #ifdefs.
Solution: Gradudate the +cmdline_info feature. (Martin Tournoij,
closes #11330)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 13 Oct 2022 23:15:05 +0200 |
parents | 15ac28c12c8f |
children | 40df8a6515f6 |
comparison
equal
deleted
inserted
replaced
30824:b7f12666bbb4 | 30825:c7983f593fa7 |
---|---|
3929 if (s == NULL) | 3929 if (s == NULL) |
3930 opt_idx = -1; | 3930 opt_idx = -1; |
3931 return opt_idx; | 3931 return opt_idx; |
3932 } | 3932 } |
3933 | 3933 |
3934 #if defined(FEAT_EVAL) || defined(FEAT_TCL) || defined(FEAT_MZSCHEME) | 3934 #if defined(FEAT_EVAL) || defined(FEAT_TCL) || defined(FEAT_MZSCHEME) || defined(FEAT_SPELL) |
3935 /* | 3935 /* |
3936 * Get the value for an option. | 3936 * Get the value for an option. |
3937 * | 3937 * |
3938 * Returns: | 3938 * Returns: |
3939 * Number option: gov_number, *numval gets value. | 3939 * Number option: gov_number, *numval gets value. |
6849 paste_option_changed(void) | 6849 paste_option_changed(void) |
6850 { | 6850 { |
6851 static int old_p_paste = FALSE; | 6851 static int old_p_paste = FALSE; |
6852 static int save_sm = 0; | 6852 static int save_sm = 0; |
6853 static int save_sta = 0; | 6853 static int save_sta = 0; |
6854 #ifdef FEAT_CMDL_INFO | |
6855 static int save_ru = 0; | 6854 static int save_ru = 0; |
6856 #endif | |
6857 #ifdef FEAT_RIGHTLEFT | 6855 #ifdef FEAT_RIGHTLEFT |
6858 static int save_ri = 0; | 6856 static int save_ri = 0; |
6859 static int save_hkmap = 0; | 6857 static int save_hkmap = 0; |
6860 #endif | 6858 #endif |
6861 buf_T *buf; | 6859 buf_T *buf; |
6885 } | 6883 } |
6886 | 6884 |
6887 // save global options | 6885 // save global options |
6888 save_sm = p_sm; | 6886 save_sm = p_sm; |
6889 save_sta = p_sta; | 6887 save_sta = p_sta; |
6890 #ifdef FEAT_CMDL_INFO | |
6891 save_ru = p_ru; | 6888 save_ru = p_ru; |
6892 #endif | |
6893 #ifdef FEAT_RIGHTLEFT | 6889 #ifdef FEAT_RIGHTLEFT |
6894 save_ri = p_ri; | 6890 save_ri = p_ri; |
6895 save_hkmap = p_hkmap; | 6891 save_hkmap = p_hkmap; |
6896 #endif | 6892 #endif |
6897 // save global values for local buffer options | 6893 // save global values for local buffer options |
6928 } | 6924 } |
6929 | 6925 |
6930 // set global options | 6926 // set global options |
6931 p_sm = 0; // no showmatch | 6927 p_sm = 0; // no showmatch |
6932 p_sta = 0; // no smarttab | 6928 p_sta = 0; // no smarttab |
6933 #ifdef FEAT_CMDL_INFO | |
6934 if (p_ru) | 6929 if (p_ru) |
6935 status_redraw_all(); // redraw to remove the ruler | 6930 status_redraw_all(); // redraw to remove the ruler |
6936 p_ru = 0; // no ruler | 6931 p_ru = 0; // no ruler |
6937 #endif | |
6938 #ifdef FEAT_RIGHTLEFT | 6932 #ifdef FEAT_RIGHTLEFT |
6939 p_ri = 0; // no reverse insert | 6933 p_ri = 0; // no reverse insert |
6940 p_hkmap = 0; // no Hebrew keyboard | 6934 p_hkmap = 0; // no Hebrew keyboard |
6941 #endif | 6935 #endif |
6942 // set global values for local buffer options | 6936 // set global values for local buffer options |
6978 } | 6972 } |
6979 | 6973 |
6980 // restore global options | 6974 // restore global options |
6981 p_sm = save_sm; | 6975 p_sm = save_sm; |
6982 p_sta = save_sta; | 6976 p_sta = save_sta; |
6983 #ifdef FEAT_CMDL_INFO | |
6984 if (p_ru != save_ru) | 6977 if (p_ru != save_ru) |
6985 status_redraw_all(); // redraw to draw the ruler | 6978 status_redraw_all(); // redraw to draw the ruler |
6986 p_ru = save_ru; | 6979 p_ru = save_ru; |
6987 #endif | |
6988 #ifdef FEAT_RIGHTLEFT | 6980 #ifdef FEAT_RIGHTLEFT |
6989 p_ri = save_ri; | 6981 p_ri = save_ri; |
6990 p_hkmap = save_hkmap; | 6982 p_hkmap = save_hkmap; |
6991 #endif | 6983 #endif |
6992 // set global values for local buffer options | 6984 // set global values for local buffer options |