comparison src/popupwin.c @ 18512:e855058e0c23 v8.1.2250

patch 8.1.2250: CTRL-U and CTRL-D don't work in popup window Commit: https://github.com/vim/vim/commit/30efcf3d26bd14af71cd306c4c5f9e789a7130c9 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Nov 3 22:29:38 2019 +0100 patch 8.1.2250: CTRL-U and CTRL-D don't work in popup window Problem: CTRL-U and CTRL-D don't work in popup window. Solution: Initialize 'scroll'. Add "lastline" in popup_getpos(). (closes #5170)
author Bram Moolenaar <Bram@vim.org>
date Sun, 03 Nov 2019 22:30:03 +0100
parents 41a5f241e9d5
children 244b336b94ce
comparison
equal deleted inserted replaced
18511:96e8a23cf3e8 18512:e855058e0c23
1371 wp->w_height = wp->w_minheight; 1371 wp->w_height = wp->w_minheight;
1372 if (wp->w_maxheight > 0 && wp->w_height > wp->w_maxheight) 1372 if (wp->w_maxheight > 0 && wp->w_height > wp->w_maxheight)
1373 wp->w_height = wp->w_maxheight; 1373 wp->w_height = wp->w_maxheight;
1374 if (wp->w_height > Rows - wp->w_winrow) 1374 if (wp->w_height > Rows - wp->w_winrow)
1375 wp->w_height = Rows - wp->w_winrow; 1375 wp->w_height = Rows - wp->w_winrow;
1376 if (wp->w_height != org_height)
1377 win_comp_scroll(wp);
1376 1378
1377 if (center_vert) 1379 if (center_vert)
1378 { 1380 {
1379 wp->w_winrow = (Rows - wp->w_height - extra_height) / 2; 1381 wp->w_winrow = (Rows - wp->w_height - extra_height) / 2;
1380 if (wp->w_winrow < 0) 1382 if (wp->w_winrow < 0)
2498 dict_add_number(dict, "core_width", wp->w_width); 2500 dict_add_number(dict, "core_width", wp->w_width);
2499 dict_add_number(dict, "core_height", wp->w_height); 2501 dict_add_number(dict, "core_height", wp->w_height);
2500 2502
2501 dict_add_number(dict, "scrollbar", wp->w_has_scrollbar); 2503 dict_add_number(dict, "scrollbar", wp->w_has_scrollbar);
2502 dict_add_number(dict, "firstline", wp->w_topline); 2504 dict_add_number(dict, "firstline", wp->w_topline);
2505 dict_add_number(dict, "lastline", wp->w_botline - 1);
2503 dict_add_number(dict, "visible", 2506 dict_add_number(dict, "visible",
2504 win_valid(wp) && (wp->w_popup_flags & POPF_HIDDEN) == 0); 2507 win_valid(wp) && (wp->w_popup_flags & POPF_HIDDEN) == 0);
2505 2508
2506 hash_unlock(&dict->dv_hashtab); 2509 hash_unlock(&dict->dv_hashtab);
2507 } 2510 }