Mercurial > vim
comparison src/popupwin.c @ 16829:5cebaecad422 v8.1.1416
patch 8.1.1416: popup_getposition() not implemented yet
commit https://github.com/vim/vim/commit/bc133543b8b0ebb1d8624e37d840b739eb00f3f3
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed May 29 20:26:46 2019 +0200
patch 8.1.1416: popup_getposition() not implemented yet
Problem: Popup_getposition() not implemented yet.
Solution: Implement it. (Yasuhiro Matsumoto, closes https://github.com/vim/vim/issues/4449)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 29 May 2019 20:30:05 +0200 |
parents | 069ee8dc8c8d |
children | 6699c03347d2 |
comparison
equal
deleted
inserted
replaced
16828:1a8e924e66ba | 16829:5cebaecad422 |
---|---|
485 clear_cmdline = TRUE; | 485 clear_cmdline = TRUE; |
486 popup_adjust_position(wp); | 486 popup_adjust_position(wp); |
487 redraw_all_later(NOT_VALID); | 487 redraw_all_later(NOT_VALID); |
488 } | 488 } |
489 | 489 |
490 /* | |
491 * popup_getposition({id}) | |
492 */ | |
493 void | |
494 f_popup_getposition(typval_T *argvars, typval_T *rettv) | |
495 { | |
496 dict_T *dict; | |
497 int id = (int)tv_get_number(argvars); | |
498 win_T *wp = find_popup_win(id); | |
499 | |
500 if (rettv_dict_alloc(rettv) == OK) | |
501 { | |
502 if (wp == NULL) | |
503 return; // invalid {id} | |
504 dict = rettv->vval.v_dict; | |
505 dict_add_number(dict, "line", wp->w_winrow + 1); | |
506 dict_add_number(dict, "col", wp->w_wincol + 1); | |
507 dict_add_number(dict, "width", wp->w_width); | |
508 dict_add_number(dict, "height", wp->w_height); | |
509 } | |
510 } | |
490 #endif // FEAT_TEXT_PROP | 511 #endif // FEAT_TEXT_PROP |