Mercurial > vim
comparison src/option.c @ 28405:473cfd79bcd8 v8.2.4727
patch 8.2.4727: unused code
Commit: https://github.com/vim/vim/commit/7765f5cf964c751cd780484220bb65773b1b0348
Author: Dominique Pelle <dominique.pelle@gmail.com>
Date: Sun Apr 10 11:26:53 2022 +0100
patch 8.2.4727: unused code
Problem: Unused code.
Solution: Remove code and add #ifdefs. (Dominique Pell?, closes https://github.com/vim/vim/issues/10136)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 10 Apr 2022 12:30:05 +0200 |
parents | 86b6432aa1d8 |
children | 4dcccb2673fe |
comparison
equal
deleted
inserted
replaced
28404:95ce25a7224a | 28405:473cfd79bcd8 |
---|---|
4461 if (i >= 0) | 4461 if (i >= 0) |
4462 return options[i].def_val[VI_DEFAULT]; | 4462 return options[i].def_val[VI_DEFAULT]; |
4463 return (char_u *)NULL; | 4463 return (char_u *)NULL; |
4464 } | 4464 } |
4465 | 4465 |
4466 #if defined(FEAT_QUICKFIX) || defined(PROTO) | |
4466 int | 4467 int |
4467 is_option_allocated(char *name) | 4468 is_option_allocated(char *name) |
4468 { | 4469 { |
4469 int idx = findoption((char_u *)name); | 4470 int idx = findoption((char_u *)name); |
4470 | 4471 |
4471 return idx >= 0 && (options[idx].flags & P_ALLOCED); | 4472 return idx >= 0 && (options[idx].flags & P_ALLOCED); |
4472 } | 4473 } |
4474 #endif | |
4473 | 4475 |
4474 /* | 4476 /* |
4475 * Translate a string like "t_xx", "<t_xx>" or "<S-Tab>" to a key number. | 4477 * Translate a string like "t_xx", "<t_xx>" or "<S-Tab>" to a key number. |
4476 * When "has_lt" is true there is a '<' before "*arg_arg". | 4478 * When "has_lt" is true there is a '<' before "*arg_arg". |
4477 * Returns 0 when the key is not recognized. | 4479 * Returns 0 when the key is not recognized. |
7177 get_bkc_value(buf_T *buf) | 7179 get_bkc_value(buf_T *buf) |
7178 { | 7180 { |
7179 return buf->b_bkc_flags ? buf->b_bkc_flags : bkc_flags; | 7181 return buf->b_bkc_flags ? buf->b_bkc_flags : bkc_flags; |
7180 } | 7182 } |
7181 | 7183 |
7184 #if defined(FEAT_LINEBREAK) || defined(PROTO) | |
7182 /* | 7185 /* |
7183 * Get the local or global value of 'formatlistpat'. | 7186 * Get the local or global value of 'formatlistpat'. |
7184 */ | 7187 */ |
7185 char_u * | 7188 char_u * |
7186 get_flp_value(buf_T *buf) | 7189 get_flp_value(buf_T *buf) |
7187 { | 7190 { |
7188 if (buf->b_p_flp == NULL || *buf->b_p_flp == NUL) | 7191 if (buf->b_p_flp == NULL || *buf->b_p_flp == NUL) |
7189 return p_flp; | 7192 return p_flp; |
7190 return buf->b_p_flp; | 7193 return buf->b_p_flp; |
7191 } | 7194 } |
7195 #endif | |
7192 | 7196 |
7193 /* | 7197 /* |
7194 * Get the local or global value of the 'virtualedit' flags. | 7198 * Get the local or global value of the 'virtualedit' flags. |
7195 */ | 7199 */ |
7196 unsigned int | 7200 unsigned int |