summaryrefslogtreecommitdiffstats
path: root/src/ex_getln.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-04-27 22:18:12 +0200
committerBram Moolenaar <Bram@vim.org>2018-04-27 22:18:12 +0200
commit9d34d90210ba52ebaf45973282e5921f5af364c7 (patch)
treeb3a56a49f0ce1d83dbb39c053edc8d642bb7f62d /src/ex_getln.c
parentc3c3e698966fac86dee94799b70947defb85440d (diff)
patch 8.0.1767: with 'incsearch' text may jump up and downv8.0.1767
Problem: With 'incsearch' text may jump up and down. () Solution: Besides w_botline also save and restore w_empty_rows. (closes # 2530)
Diffstat (limited to 'src/ex_getln.c')
-rw-r--r--src/ex_getln.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ex_getln.c b/src/ex_getln.c
index 9fdfac5a28..5a1bdc0ea7 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -237,8 +237,9 @@ getcmdline(
int old_topfill;
int init_topfill = curwin->w_topfill;
# endif
- linenr_T old_botline;
+ linenr_T old_botline, old_empty_rows;
linenr_T init_botline = curwin->w_botline;
+ linenr_T init_empty_rows = curwin->w_empty_rows;
int did_incsearch = FALSE;
int incsearch_postponed = FALSE;
#endif
@@ -291,6 +292,7 @@ getcmdline(
old_topfill = curwin->w_topfill;
# endif
old_botline = curwin->w_botline;
+ old_empty_rows = curwin->w_empty_rows;
#endif
/*
@@ -1075,6 +1077,7 @@ getcmdline(
old_topfill = init_topfill;
# endif
old_botline = init_botline;
+ old_empty_rows = init_empty_rows;
}
#endif
redrawcmd();
@@ -1804,6 +1807,7 @@ getcmdline(
old_topfill = curwin->w_topfill;
# endif
old_botline = curwin->w_botline;
+ old_empty_rows = curwin->w_empty_rows;
update_screen(NOT_VALID);
redrawcmdline();
}
@@ -2020,6 +2024,7 @@ cmdline_changed:
curwin->w_topfill = old_topfill;
# endif
curwin->w_botline = old_botline;
+ curwin->w_empty_rows = old_empty_rows;
changed_cline_bef_curs();
update_topline();
@@ -2114,6 +2119,7 @@ returncmd:
curwin->w_topfill = old_topfill;
# endif
curwin->w_botline = old_botline;
+ curwin->w_empty_rows = old_empty_rows;
highlight_match = FALSE;
validate_cursor(); /* needed for TAB */
redraw_all_later(SOME_VALID);