Mercurial > vim
comparison src/indent.c @ 18679:fd95d4dbeb37 v8.1.2331
patch 8.1.2331: the option.c file is still very big
Commit: https://github.com/vim/vim/commit/7bae0b1bc84a95d565ffab38cf7f82ad21c656b6
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Nov 21 22:14:18 2019 +0100
patch 8.1.2331: the option.c file is still very big
Problem: The option.c file is still very big.
Solution: Move a few functions to where they fit better. (Yegappan
Lakshmanan, closes #4895)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 21 Nov 2019 22:15:03 +0100 |
parents | 788d76db02ac |
children | 49b78d6465e5 |
comparison
equal
deleted
inserted
replaced
18678:cb4a4b71df4a | 18679:fd95d4dbeb37 |
---|---|
836 getvcol(curwin, &pos, &col, NULL, NULL); | 836 getvcol(curwin, &pos, &col, NULL, NULL); |
837 return (int)col; | 837 return (int)col; |
838 } | 838 } |
839 | 839 |
840 #if defined(FEAT_LINEBREAK) || defined(PROTO) | 840 #if defined(FEAT_LINEBREAK) || defined(PROTO) |
841 /* | |
842 * This is called when 'breakindentopt' is changed and when a window is | |
843 * initialized. | |
844 */ | |
845 int | |
846 briopt_check(win_T *wp) | |
847 { | |
848 char_u *p; | |
849 int bri_shift = 0; | |
850 long bri_min = 20; | |
851 int bri_sbr = FALSE; | |
852 | |
853 p = wp->w_p_briopt; | |
854 while (*p != NUL) | |
855 { | |
856 if (STRNCMP(p, "shift:", 6) == 0 | |
857 && ((p[6] == '-' && VIM_ISDIGIT(p[7])) || VIM_ISDIGIT(p[6]))) | |
858 { | |
859 p += 6; | |
860 bri_shift = getdigits(&p); | |
861 } | |
862 else if (STRNCMP(p, "min:", 4) == 0 && VIM_ISDIGIT(p[4])) | |
863 { | |
864 p += 4; | |
865 bri_min = getdigits(&p); | |
866 } | |
867 else if (STRNCMP(p, "sbr", 3) == 0) | |
868 { | |
869 p += 3; | |
870 bri_sbr = TRUE; | |
871 } | |
872 if (*p != ',' && *p != NUL) | |
873 return FAIL; | |
874 if (*p == ',') | |
875 ++p; | |
876 } | |
877 | |
878 wp->w_p_brishift = bri_shift; | |
879 wp->w_p_brimin = bri_min; | |
880 wp->w_p_brisbr = bri_sbr; | |
881 | |
882 return OK; | |
883 } | |
884 | |
841 /* | 885 /* |
842 * Return appropriate space number for breakindent, taking influencing | 886 * Return appropriate space number for breakindent, taking influencing |
843 * parameters into account. Window must be specified, since it is not | 887 * parameters into account. Window must be specified, since it is not |
844 * necessarily always the current one. | 888 * necessarily always the current one. |
845 */ | 889 */ |