mirror of
https://github.com/vim/vim.git
synced 2025-09-28 04:24:06 -04:00
patch 7.4.853
Problem: "zt" in diff mode does not always work properly. (Gary Johnson) Solution: Don't count filler lines twice. (Christian Brabandt)
This commit is contained in:
12
src/move.c
12
src/move.c
@@ -1732,7 +1732,7 @@ scroll_cursor_top(min_scroll, always)
|
|||||||
* - at least 'scrolloff' lines above and below the cursor
|
* - at least 'scrolloff' lines above and below the cursor
|
||||||
*/
|
*/
|
||||||
validate_cheight();
|
validate_cheight();
|
||||||
used = curwin->w_cline_height;
|
used = curwin->w_cline_height; /* includes filler lines above */
|
||||||
if (curwin->w_cursor.lnum < curwin->w_topline)
|
if (curwin->w_cursor.lnum < curwin->w_topline)
|
||||||
scrolled = used;
|
scrolled = used;
|
||||||
|
|
||||||
@@ -1751,10 +1751,12 @@ scroll_cursor_top(min_scroll, always)
|
|||||||
new_topline = top + 1;
|
new_topline = top + 1;
|
||||||
|
|
||||||
#ifdef FEAT_DIFF
|
#ifdef FEAT_DIFF
|
||||||
/* count filler lines of the cursor window as context */
|
/* used already contains the number of filler lines above, don't add it
|
||||||
i = diff_check_fill(curwin, curwin->w_cursor.lnum);
|
* again.
|
||||||
used += i;
|
* TODO: if filler lines above new top are to be considered as context for
|
||||||
extra += i;
|
* the current window, leave next statement commented, else hide filler
|
||||||
|
* lines above cursor line, by adding them to extra */
|
||||||
|
/* extra += diff_check_fill(curwin, curwin->w_cursor.lnum); */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -741,6 +741,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
853,
|
||||||
/**/
|
/**/
|
||||||
852,
|
852,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user