comparison src/evalfunc.c @ 17253:26e0352613ec v8.1.1626

patch 8.1.1626: no test for closing a popup window with a modified buffer commit https://github.com/vim/vim/commit/5ca1ac373ae62b37152cb6f85916b402eda520a5 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jul 4 15:39:28 2019 +0200 patch 8.1.1626: no test for closing a popup window with a modified buffer Problem: No test for closing a popup window with a modified buffer. Solution: Add a test. Add "popups" to getbufinfo().
author Bram Moolenaar <Bram@vim.org>
date Thu, 04 Jul 2019 15:45:05 +0200
parents 24f42f0bf27e
children 8a095d343c59
comparison
equal deleted inserted replaced
17252:c46563862cd9 17253:26e0352613ec
4507 dict_add_number(dict, "changed", bufIsChanged(buf)); 4507 dict_add_number(dict, "changed", bufIsChanged(buf));
4508 dict_add_number(dict, "changedtick", CHANGEDTICK(buf)); 4508 dict_add_number(dict, "changedtick", CHANGEDTICK(buf));
4509 dict_add_number(dict, "hidden", 4509 dict_add_number(dict, "hidden",
4510 buf->b_ml.ml_mfp != NULL && buf->b_nwindows == 0); 4510 buf->b_ml.ml_mfp != NULL && buf->b_nwindows == 0);
4511 4511
4512 /* Get a reference to buffer variables */ 4512 // Get a reference to buffer variables
4513 dict_add_dict(dict, "variables", buf->b_vars); 4513 dict_add_dict(dict, "variables", buf->b_vars);
4514 4514
4515 /* List of windows displaying this buffer */ 4515 // List of windows displaying this buffer
4516 windows = list_alloc(); 4516 windows = list_alloc();
4517 if (windows != NULL) 4517 if (windows != NULL)
4518 { 4518 {
4519 FOR_ALL_TAB_WINDOWS(tp, wp) 4519 FOR_ALL_TAB_WINDOWS(tp, wp)
4520 if (wp->w_buffer == buf) 4520 if (wp->w_buffer == buf)
4521 list_append_number(windows, (varnumber_T)wp->w_id); 4521 list_append_number(windows, (varnumber_T)wp->w_id);
4522 dict_add_list(dict, "windows", windows); 4522 dict_add_list(dict, "windows", windows);
4523 } 4523 }
4524
4525 #ifdef FEAT_TEXT_PROP
4526 // List of popup windows displaying this buffer
4527 windows = list_alloc();
4528 if (windows != NULL)
4529 {
4530 for (wp = first_popupwin; wp != NULL; wp = wp->w_next)
4531 if (wp->w_buffer == buf)
4532 list_append_number(windows, (varnumber_T)wp->w_id);
4533 FOR_ALL_TABPAGES(tp)
4534 for (wp = tp->tp_first_popupwin; wp != NULL; wp = wp->w_next)
4535 if (wp->w_buffer == buf)
4536 list_append_number(windows, (varnumber_T)wp->w_id);
4537
4538 dict_add_list(dict, "popups", windows);
4539 }
4540 #endif
4524 4541
4525 #ifdef FEAT_SIGNS 4542 #ifdef FEAT_SIGNS
4526 if (buf->b_signlist != NULL) 4543 if (buf->b_signlist != NULL)
4527 { 4544 {
4528 /* List of signs placed in this buffer */ 4545 /* List of signs placed in this buffer */
5683 5700
5684 l = list_alloc(); 5701 l = list_alloc();
5685 if (l != NULL) 5702 if (l != NULL)
5686 { 5703 {
5687 for (wp = (tp == curtab) ? firstwin : tp->tp_firstwin; 5704 for (wp = (tp == curtab) ? firstwin : tp->tp_firstwin;
5688 wp; wp = wp->w_next) 5705 wp != NULL; wp = wp->w_next)
5689 list_append_number(l, (varnumber_T)wp->w_id); 5706 list_append_number(l, (varnumber_T)wp->w_id);
5690 dict_add_list(dict, "windows", l); 5707 dict_add_list(dict, "windows", l);
5691 } 5708 }
5692 5709
5693 /* Make a reference to tabpage variables */ 5710 /* Make a reference to tabpage variables */