Mercurial > vim
comparison src/popupwin.c @ 16841:cf630fab9fb6 v8.1.1422
patch 8.1.1422: popup_getoptions() not implemented yet
commit https://github.com/vim/vim/commit/8c2a600f72ca930841a5f4f7eac22884238afaf3
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu May 30 14:29:45 2019 +0200
patch 8.1.1422: popup_getoptions() not implemented yet
Problem: Popup_getoptions() not implemented yet.
Solution: Implement it. (closes https://github.com/vim/vim/issues/4452)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 30 May 2019 14:30:07 +0200 |
parents | 032d5335987e |
children | 283037126560 |
comparison
equal
deleted
inserted
replaced
16840:e9db83da71f5 | 16841:cf630fab9fb6 |
---|---|
528 dict = rettv->vval.v_dict; | 528 dict = rettv->vval.v_dict; |
529 dict_add_number(dict, "line", wp->w_winrow + 1); | 529 dict_add_number(dict, "line", wp->w_winrow + 1); |
530 dict_add_number(dict, "col", wp->w_wincol + 1); | 530 dict_add_number(dict, "col", wp->w_wincol + 1); |
531 dict_add_number(dict, "width", wp->w_width); | 531 dict_add_number(dict, "width", wp->w_width); |
532 dict_add_number(dict, "height", wp->w_height); | 532 dict_add_number(dict, "height", wp->w_height); |
533 dict_add_number(dict, "visible", | |
534 (wp->w_popup_flags & POPF_HIDDEN) == 0); | |
535 } | |
536 } | |
537 | |
538 /* | |
539 * f_popup_getoptions({id}) | |
540 */ | |
541 void | |
542 f_popup_getoptions(typval_T *argvars, typval_T *rettv) | |
543 { | |
544 dict_T *dict; | |
545 int id = (int)tv_get_number(argvars); | |
546 win_T *wp = find_popup_win(id); | |
547 | |
548 if (rettv_dict_alloc(rettv) == OK) | |
549 { | |
550 if (wp == NULL) | |
551 return; | |
552 | |
553 dict = rettv->vval.v_dict; | |
554 dict_add_number(dict, "line", wp->w_wantline); | |
555 dict_add_number(dict, "col", wp->w_wantcol); | |
556 dict_add_number(dict, "minwidth", wp->w_minwidth); | |
557 dict_add_number(dict, "minheight", wp->w_minheight); | |
558 dict_add_number(dict, "maxheight", wp->w_maxheight); | |
559 dict_add_number(dict, "maxwidth", wp->w_maxwidth); | |
560 dict_add_number(dict, "zindex", wp->w_zindex); | |
561 # if defined(FEAT_TIMERS) | |
562 dict_add_number(dict, "time", wp->w_popup_timer != NULL | |
563 ? (long)wp->w_popup_timer->tr_interval : 0L); | |
564 # endif | |
533 } | 565 } |
534 } | 566 } |
535 #endif // FEAT_TEXT_PROP | 567 #endif // FEAT_TEXT_PROP |