comparison src/popupwin.c @ 16857:4de94f6161f2 v8.1.1430

patch 8.1.1430: popup window option "wrap" not supported commit https://github.com/vim/vim/commit/402502d0e4019ca97330eff40b9fb13736304896 Author: Bram Moolenaar <Bram@vim.org> Date: Thu May 30 22:07:36 2019 +0200 patch 8.1.1430: popup window option "wrap" not supported Problem: Popup window option "wrap" not supported. Solution: Implement it.
author Bram Moolenaar <Bram@vim.org>
date Thu, 30 May 2019 22:15:06 +0200
parents 19162ff4eacd
children 0154363d3b98
comparison
equal deleted inserted replaced
16856:04692a1fa962 16857:4de94f6161f2
107 * When called from f_popup_atcursor() "atcursor" is TRUE. 107 * When called from f_popup_atcursor() "atcursor" is TRUE.
108 */ 108 */
109 static void 109 static void
110 apply_options(win_T *wp, buf_T *buf UNUSED, dict_T *dict, int atcursor) 110 apply_options(win_T *wp, buf_T *buf UNUSED, dict_T *dict, int atcursor)
111 { 111 {
112 #if defined(FEAT_TIMERS) 112 int nr;
113 int nr; 113 char_u *str;
114 #endif 114 dictitem_T *di;
115 char_u *str;
116 115
117 wp->w_minwidth = dict_get_number(dict, (char_u *)"minwidth"); 116 wp->w_minwidth = dict_get_number(dict, (char_u *)"minwidth");
118 wp->w_minheight = dict_get_number(dict, (char_u *)"minheight"); 117 wp->w_minheight = dict_get_number(dict, (char_u *)"minheight");
119 wp->w_maxwidth = dict_get_number(dict, (char_u *)"maxwidth"); 118 wp->w_maxwidth = dict_get_number(dict, (char_u *)"maxwidth");
120 wp->w_maxheight = dict_get_number(dict, (char_u *)"maxheight"); 119 wp->w_maxheight = dict_get_number(dict, (char_u *)"maxheight");
156 wp->w_popup_timer->tr_partial = tv.vval.v_partial; 155 wp->w_popup_timer->tr_partial = tv.vval.v_partial;
157 } 156 }
158 } 157 }
159 #endif 158 #endif
160 159
160 // Option values resulting in setting an option.
161 str = dict_get_string(dict, (char_u *)"highlight", TRUE); 161 str = dict_get_string(dict, (char_u *)"highlight", TRUE);
162 if (str != NULL) 162 if (str != NULL)
163 set_string_option_direct_in_win(wp, (char_u *)"wincolor", -1, 163 set_string_option_direct_in_win(wp, (char_u *)"wincolor", -1,
164 str, OPT_FREE|OPT_LOCAL, 0); 164 str, OPT_FREE|OPT_LOCAL, 0);
165 di = dict_find(dict, (char_u *)"wrap", -1);
166 if (di != NULL)
167 {
168 nr = dict_get_number(dict, (char_u *)"wrap");
169 wp->w_p_wrap = nr != 0;
170 }
165 } 171 }
166 172
167 /* 173 /*
168 * Add lines to the popup from a list of strings. 174 * Add lines to the popup from a list of strings.
169 */ 175 */