diff options
Diffstat (limited to 'src/diff.c')
-rw-r--r-- | src/diff.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/diff.c b/src/diff.c index 35e29fcdf9..05ca7ac250 100644 --- a/src/diff.c +++ b/src/diff.c @@ -1075,6 +1075,10 @@ ex_diffsplit(exarg_T *eap) #ifdef FEAT_GUI need_mouse_correct = TRUE; #endif + /* Need to compute w_fraction when no redraw happened yet. */ + validate_cursor(); + set_fraction(curwin); + /* don't use a new tab page, each tab page has its own diffs */ cmdmod.tab = 0; @@ -1101,6 +1105,9 @@ ex_diffsplit(exarg_T *eap) curbuf, curwin->w_cursor.lnum); } + /* Now that lines are folded scroll to show the cursor at the same + * relative position. */ + scroll_to_fraction(curwin, curwin->w_height); } } } |