Mirror of the Vim source from https://github.com/vim/vim
修订版 | fb2d26bc8ca159c7eb29ceb1a9354ac1deb366fd (tree) |
---|---|
时间 | 2019-12-15 02:45:04 |
作者 | Bram Moolenaar <Bram@vim....> |
Commiter | Bram Moolenaar |
patch 8.2.0007: popup menu positioned wrong with folding in two tabs
Commit: https://github.com/vim/vim/commit/09dd2bb3364cc8fb5a8f2507bc2f4ceba481db3d
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Dec 14 18:42:15 2019 +0100
@@ -816,7 +816,7 @@ | ||
816 | 816 | /* |
817 | 817 | * Validate curwin->w_cline_height only. |
818 | 818 | */ |
819 | - static void | |
819 | + void | |
820 | 820 | validate_cheight(void) |
821 | 821 | { |
822 | 822 | check_cursor_moved(curwin); |
@@ -180,6 +180,7 @@ | ||
180 | 180 | // pum below "pum_win_row" |
181 | 181 | |
182 | 182 | // Leave two lines of context if possible |
183 | + validate_cheight(); | |
183 | 184 | if (curwin->w_cline_row |
184 | 185 | + curwin->w_cline_height - curwin->w_wrow >= 3) |
185 | 186 | context_lines = 3; |
@@ -21,6 +21,7 @@ | ||
21 | 21 | void validate_cline_row(void); |
22 | 22 | void validate_virtcol(void); |
23 | 23 | void validate_virtcol_win(win_T *wp); |
24 | +void validate_cheight(void); | |
24 | 25 | void validate_cursor_col(void); |
25 | 26 | int win_col_off(win_T *wp); |
26 | 27 | int curwin_col_off(void); |
@@ -0,0 +1,10 @@ | ||
1 | +| +8#0000001#e0e0e08|+| |[|N|o| |N|a|m|e|]| | +2#0000000#ffffff0|+| |[|N|o| |N|a|m|e|]| | +1&&@47|X+8#0000001#e0e0e08 | |
2 | +|"+0#0000000#ffffff0| |x| |{@2|1| @66 | |
3 | +|"| |a|0> |s|o|m|e| |t|e|x|t| @60 | |
4 | +|"| +0#0000001#e0e0e08|a|0| @12| +0#0000000#0000001| +0&#ffffff0@56 | |
5 | +|"| +0#0000001#ffd7ff255|a|1| @12| +0#0000000#0000001| +0&#ffffff0@56 | |
6 | +|"| +0#0000001#ffd7ff255|a|2| @12| +0#0000000#0000001| +0&#ffffff0@56 | |
7 | +|"| +0#0000001#ffd7ff255|a|3| @12| +0#0000000#a8a8a8255| +0&#ffffff0@56 | |
8 | +|"| +0#0000001#ffd7ff255|a|4| @12| +0#0000000#a8a8a8255| +0&#ffffff0@56 | |
9 | +|"| +0#0000001#ffd7ff255|a|5| @12| +0#0000000#a8a8a8255| +0&#ffffff0@56 | |
10 | +|-+2&&@1| |K|e|y|w|o|r|d| |c|o|m|p|l|e|t|i|o|n| |(|^|N|^|P|)| |m+0#00e0003&|a|t|c|h| |1| |o|f| |1|0| +0#0000000&@32 |
@@ -1,3 +1,4 @@ | ||
1 | +source screendump.vim | |
1 | 2 | source check.vim |
2 | 3 | |
3 | 4 | " Test for insert expansion |
@@ -380,3 +381,26 @@ | ||
380 | 381 | set completeslash= |
381 | 382 | endfunc |
382 | 383 | |
384 | +func Test_pum_with_folds_two_tabs() | |
385 | + CheckScreendump | |
386 | + | |
387 | + let lines =<< trim END | |
388 | + set fdm=marker | |
389 | + call setline(1, ['" x {{{1', '" a some text']) | |
390 | + call setline(3, range(&lines)->map({_, val -> '" a' .. val})) | |
391 | + norm! zm | |
392 | + tab sp | |
393 | + call feedkeys('2Gzv', 'xt') | |
394 | + call feedkeys("0fa", 'xt') | |
395 | + END | |
396 | + | |
397 | + call writefile(lines, 'Xpumscript') | |
398 | + let buf = RunVimInTerminal('-S Xpumscript', #{rows: 10}) | |
399 | + call term_wait(buf, 100) | |
400 | + call term_sendkeys(buf, "a\<C-N>") | |
401 | + call VerifyScreenDump(buf, 'Test_pum_with_folds_two_tabs', {}) | |
402 | + | |
403 | + call term_sendkeys(buf, "\<Esc>") | |
404 | + call StopVimInTerminal(buf) | |
405 | + call delete('Xpumscript') | |
406 | +endfunc |
@@ -743,6 +743,8 @@ | ||
743 | 743 | static int included_patches[] = |
744 | 744 | { /* Add new patch number below this line */ |
745 | 745 | /**/ |
746 | + 7, | |
747 | +/**/ | |
746 | 748 | 6, |
747 | 749 | /**/ |
748 | 750 | 5, |