comparison src/ex_getln.c @ 13790:dd6a63e3e7c4 v8.0.1767

patch 8.0.1767: with 'incsearch' text may jump up and down commit https://github.com/vim/vim/commit/9d34d90210ba52ebaf45973282e5921f5af364c7 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Apr 27 22:18:12 2018 +0200 patch 8.0.1767: with 'incsearch' text may jump up and down Problem: With 'incsearch' text may jump up and down. () Solution: Besides w_botline also save and restore w_empty_rows. (closes # 2530)
author Christian Brabandt <cb@256bit.org>
date Fri, 27 Apr 2018 22:30:06 +0200
parents 75e35ebdb7a4
children 0e9b2971d7c3
comparison
equal deleted inserted replaced
13789:2df62da42cac 13790:dd6a63e3e7c4
235 pos_T match_end; 235 pos_T match_end;
236 # ifdef FEAT_DIFF 236 # ifdef FEAT_DIFF
237 int old_topfill; 237 int old_topfill;
238 int init_topfill = curwin->w_topfill; 238 int init_topfill = curwin->w_topfill;
239 # endif 239 # endif
240 linenr_T old_botline; 240 linenr_T old_botline, old_empty_rows;
241 linenr_T init_botline = curwin->w_botline; 241 linenr_T init_botline = curwin->w_botline;
242 linenr_T init_empty_rows = curwin->w_empty_rows;
242 int did_incsearch = FALSE; 243 int did_incsearch = FALSE;
243 int incsearch_postponed = FALSE; 244 int incsearch_postponed = FALSE;
244 #endif 245 #endif
245 int did_wild_list = FALSE; /* did wild_list() recently */ 246 int did_wild_list = FALSE; /* did wild_list() recently */
246 int wim_index = 0; /* index in wim_flags[] */ 247 int wim_index = 0; /* index in wim_flags[] */
289 old_topline = curwin->w_topline; 290 old_topline = curwin->w_topline;
290 # ifdef FEAT_DIFF 291 # ifdef FEAT_DIFF
291 old_topfill = curwin->w_topfill; 292 old_topfill = curwin->w_topfill;
292 # endif 293 # endif
293 old_botline = curwin->w_botline; 294 old_botline = curwin->w_botline;
295 old_empty_rows = curwin->w_empty_rows;
294 #endif 296 #endif
295 297
296 /* 298 /*
297 * set some variables for redrawcmd() 299 * set some variables for redrawcmd()
298 */ 300 */
1073 old_topline = init_topline; 1075 old_topline = init_topline;
1074 # ifdef FEAT_DIFF 1076 # ifdef FEAT_DIFF
1075 old_topfill = init_topfill; 1077 old_topfill = init_topfill;
1076 # endif 1078 # endif
1077 old_botline = init_botline; 1079 old_botline = init_botline;
1080 old_empty_rows = init_empty_rows;
1078 } 1081 }
1079 #endif 1082 #endif
1080 redrawcmd(); 1083 redrawcmd();
1081 } 1084 }
1082 else if (ccline.cmdlen == 0 && c != Ctrl_W 1085 else if (ccline.cmdlen == 0 && c != Ctrl_W
1802 old_topline = curwin->w_topline; 1805 old_topline = curwin->w_topline;
1803 # ifdef FEAT_DIFF 1806 # ifdef FEAT_DIFF
1804 old_topfill = curwin->w_topfill; 1807 old_topfill = curwin->w_topfill;
1805 # endif 1808 # endif
1806 old_botline = curwin->w_botline; 1809 old_botline = curwin->w_botline;
1810 old_empty_rows = curwin->w_empty_rows;
1807 update_screen(NOT_VALID); 1811 update_screen(NOT_VALID);
1808 redrawcmdline(); 1812 redrawcmdline();
1809 } 1813 }
1810 else 1814 else
1811 vim_beep(BO_ERROR); 1815 vim_beep(BO_ERROR);
2018 curwin->w_topline = old_topline; 2022 curwin->w_topline = old_topline;
2019 # ifdef FEAT_DIFF 2023 # ifdef FEAT_DIFF
2020 curwin->w_topfill = old_topfill; 2024 curwin->w_topfill = old_topfill;
2021 # endif 2025 # endif
2022 curwin->w_botline = old_botline; 2026 curwin->w_botline = old_botline;
2027 curwin->w_empty_rows = old_empty_rows;
2023 changed_cline_bef_curs(); 2028 changed_cline_bef_curs();
2024 update_topline(); 2029 update_topline();
2025 2030
2026 if (i != 0) 2031 if (i != 0)
2027 { 2032 {
2112 curwin->w_topline = old_topline; 2117 curwin->w_topline = old_topline;
2113 # ifdef FEAT_DIFF 2118 # ifdef FEAT_DIFF
2114 curwin->w_topfill = old_topfill; 2119 curwin->w_topfill = old_topfill;
2115 # endif 2120 # endif
2116 curwin->w_botline = old_botline; 2121 curwin->w_botline = old_botline;
2122 curwin->w_empty_rows = old_empty_rows;
2117 highlight_match = FALSE; 2123 highlight_match = FALSE;
2118 validate_cursor(); /* needed for TAB */ 2124 validate_cursor(); /* needed for TAB */
2119 redraw_all_later(SOME_VALID); 2125 redraw_all_later(SOME_VALID);
2120 } 2126 }
2121 #endif 2127 #endif