Mercurial > vim
comparison src/option.c @ 1805:a5e1d6526ac7 v7.2.103
updated for version 7.2-103
author | vimboss |
---|---|
date | Wed, 11 Feb 2009 10:35:36 +0000 |
parents | c4d5f3d8ad71 |
children | a66c40578675 |
comparison
equal
deleted
inserted
replaced
1804:f38b7359dafd | 1805:a5e1d6526ac7 |
---|---|
5266 /* Nothing special, return global flags field. */ | 5266 /* Nothing special, return global flags field. */ |
5267 return &options[opt_idx].flags; | 5267 return &options[opt_idx].flags; |
5268 } | 5268 } |
5269 #endif | 5269 #endif |
5270 | 5270 |
5271 #ifdef FEAT_TITLE | |
5272 static void redraw_titles __ARGS((void)); | |
5273 | |
5274 /* | |
5275 * Redraw the window title and/or tab page text later. | |
5276 */ | |
5277 static void redraw_titles() | |
5278 { | |
5279 need_maketitle = TRUE; | |
5280 # ifdef FEAT_WINDOWS | |
5281 redraw_tabline = TRUE; | |
5282 # endif | |
5283 } | |
5284 #endif | |
5285 | |
5271 /* | 5286 /* |
5272 * Set a string option to a new value (without checking the effect). | 5287 * Set a string option to a new value (without checking the effect). |
5273 * The string is copied into allocated memory. | 5288 * The string is copied into allocated memory. |
5274 * if ("opt_idx" == -1) "name" is used, otherwise "opt_idx" is used. | 5289 * if ("opt_idx" == -1) "name" is used, otherwise "opt_idx" is used. |
5275 * When "set_sid" is zero set the scriptID to current_SID. When "set_sid" is | 5290 * When "set_sid" is zero set the scriptID to current_SID. When "set_sid" is |
5670 errmsg = e_invarg; | 5685 errmsg = e_invarg; |
5671 else | 5686 else |
5672 { | 5687 { |
5673 # ifdef FEAT_TITLE | 5688 # ifdef FEAT_TITLE |
5674 /* May show a "+" in the title now. */ | 5689 /* May show a "+" in the title now. */ |
5675 need_maketitle = TRUE; | 5690 redraw_titles(); |
5676 # endif | 5691 # endif |
5677 /* Add 'fileencoding' to the swap file. */ | 5692 /* Add 'fileencoding' to the swap file. */ |
5678 ml_setflags(curbuf); | 5693 ml_setflags(curbuf); |
5679 } | 5694 } |
5680 } | 5695 } |
5689 } | 5704 } |
5690 if (varp == &p_enc) | 5705 if (varp == &p_enc) |
5691 { | 5706 { |
5692 errmsg = mb_init(); | 5707 errmsg = mb_init(); |
5693 # ifdef FEAT_TITLE | 5708 # ifdef FEAT_TITLE |
5694 need_maketitle = TRUE; | 5709 redraw_titles(); |
5695 # endif | 5710 # endif |
5696 } | 5711 } |
5697 } | 5712 } |
5698 | 5713 |
5699 # if defined(FEAT_GUI_GTK) && defined(HAVE_GTK2) | 5714 # if defined(FEAT_GUI_GTK) && defined(HAVE_GTK2) |
5798 if (get_fileformat(curbuf) == EOL_DOS) | 5813 if (get_fileformat(curbuf) == EOL_DOS) |
5799 curbuf->b_p_tx = TRUE; | 5814 curbuf->b_p_tx = TRUE; |
5800 else | 5815 else |
5801 curbuf->b_p_tx = FALSE; | 5816 curbuf->b_p_tx = FALSE; |
5802 #ifdef FEAT_TITLE | 5817 #ifdef FEAT_TITLE |
5803 need_maketitle = TRUE; | 5818 redraw_titles(); |
5804 #endif | 5819 #endif |
5805 /* update flag in swap file */ | 5820 /* update flag in swap file */ |
5806 ml_setflags(curbuf); | 5821 ml_setflags(curbuf); |
5807 } | 5822 } |
5808 } | 5823 } |
7125 /* when 'readonly' is set may give W10 again */ | 7140 /* when 'readonly' is set may give W10 again */ |
7126 if (curbuf->b_p_ro) | 7141 if (curbuf->b_p_ro) |
7127 curbuf->b_did_warn = FALSE; | 7142 curbuf->b_did_warn = FALSE; |
7128 | 7143 |
7129 #ifdef FEAT_TITLE | 7144 #ifdef FEAT_TITLE |
7130 need_maketitle = TRUE; | 7145 redraw_titles(); |
7131 #endif | 7146 #endif |
7132 } | 7147 } |
7133 | 7148 |
7134 #ifdef FEAT_TITLE | 7149 #ifdef FEAT_TITLE |
7135 /* when 'modifiable' is changed, redraw the window title */ | 7150 /* when 'modifiable' is changed, redraw the window title */ |
7136 else if ((int *)varp == &curbuf->b_p_ma) | 7151 else if ((int *)varp == &curbuf->b_p_ma) |
7137 need_maketitle = TRUE; | 7152 { |
7153 redraw_titles(); | |
7154 } | |
7138 /* when 'endofline' is changed, redraw the window title */ | 7155 /* when 'endofline' is changed, redraw the window title */ |
7139 else if ((int *)varp == &curbuf->b_p_eol) | 7156 else if ((int *)varp == &curbuf->b_p_eol) |
7140 need_maketitle = TRUE; | 7157 { |
7141 #ifdef FEAT_MBYTE | 7158 redraw_titles(); |
7142 /* when 'bomb' is changed, redraw the window title */ | 7159 } |
7160 # ifdef FEAT_MBYTE | |
7161 /* when 'bomb' is changed, redraw the window title and tab page text */ | |
7143 else if ((int *)varp == &curbuf->b_p_bomb) | 7162 else if ((int *)varp == &curbuf->b_p_bomb) |
7144 need_maketitle = TRUE; | 7163 { |
7145 #endif | 7164 redraw_titles(); |
7165 } | |
7166 # endif | |
7146 #endif | 7167 #endif |
7147 | 7168 |
7148 /* when 'bin' is set also set some other options */ | 7169 /* when 'bin' is set also set some other options */ |
7149 else if ((int *)varp == &curbuf->b_p_bin) | 7170 else if ((int *)varp == &curbuf->b_p_bin) |
7150 { | 7171 { |
7151 set_options_bin(old_value, curbuf->b_p_bin, opt_flags); | 7172 set_options_bin(old_value, curbuf->b_p_bin, opt_flags); |
7152 #ifdef FEAT_TITLE | 7173 #ifdef FEAT_TITLE |
7153 need_maketitle = TRUE; | 7174 redraw_titles(); |
7154 #endif | 7175 #endif |
7155 } | 7176 } |
7156 | 7177 |
7157 #ifdef FEAT_AUTOCMD | 7178 #ifdef FEAT_AUTOCMD |
7158 /* when 'buflisted' changes, trigger autocommands */ | 7179 /* when 'buflisted' changes, trigger autocommands */ |
7299 else if ((int *)varp == &curbuf->b_changed) | 7320 else if ((int *)varp == &curbuf->b_changed) |
7300 { | 7321 { |
7301 if (!value) | 7322 if (!value) |
7302 save_file_ff(curbuf); /* Buffer is unchanged */ | 7323 save_file_ff(curbuf); /* Buffer is unchanged */ |
7303 #ifdef FEAT_TITLE | 7324 #ifdef FEAT_TITLE |
7304 need_maketitle = TRUE; | 7325 redraw_titles(); |
7305 #endif | 7326 #endif |
7306 #ifdef FEAT_AUTOCMD | 7327 #ifdef FEAT_AUTOCMD |
7307 modified_was_set = value; | 7328 modified_was_set = value; |
7308 #endif | 7329 #endif |
7309 } | 7330 } |
7734 if (curwin->w_p_fdl < 0) | 7755 if (curwin->w_p_fdl < 0) |
7735 curwin->w_p_fdl = 0; | 7756 curwin->w_p_fdl = 0; |
7736 newFoldLevel(); | 7757 newFoldLevel(); |
7737 } | 7758 } |
7738 | 7759 |
7739 /* 'foldminlevel' */ | 7760 /* 'foldminlines' */ |
7740 else if (pp == &curwin->w_p_fml) | 7761 else if (pp == &curwin->w_p_fml) |
7741 { | 7762 { |
7742 foldUpdateAll(curwin); | 7763 foldUpdateAll(curwin); |
7743 } | 7764 } |
7744 | 7765 |