diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-02-21 23:12:18 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-02-21 23:12:18 +0100 |
commit | 6bfc475f717aa0412d13163d47ff6210fa611fb5 (patch) | |
tree | 1d53120c1bfc53f64f69bd3db780f4e96490487d /src/popupwin.c | |
parent | b4893b84507570f24af32597716ffb67fb0ef24e (diff) |
patch 8.2.2541: popup_create() does not allow boolean for "cursorline"v8.2.2541
Problem: Popup_create() does not allow boolean for "cursorline".
Solution: Use dict_get_bool(). (issue #7869)
Diffstat (limited to 'src/popupwin.c')
-rw-r--r-- | src/popupwin.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/popupwin.c b/src/popupwin.c index 1122f48e72..335345f3a0 100644 --- a/src/popupwin.c +++ b/src/popupwin.c @@ -873,18 +873,13 @@ apply_general_options(win_T *wp, dict_T *dict) handle_moved_argument(wp, di, TRUE); } - di = dict_find(dict, (char_u *)"cursorline", -1); - if (di != NULL) + nr = dict_get_bool(dict, (char_u *)"cursorline", -1); + if (nr != -1) { - if (di->di_tv.v_type == VAR_NUMBER) - { - if (di->di_tv.vval.v_number != 0) - wp->w_popup_flags |= POPF_CURSORLINE; - else - wp->w_popup_flags &= ~POPF_CURSORLINE; - } + if (nr != 0) + wp->w_popup_flags |= POPF_CURSORLINE; else - semsg(_(e_invargval), "cursorline"); + wp->w_popup_flags &= ~POPF_CURSORLINE; } di = dict_find(dict, (char_u *)"filter", -1); |