vim / vim

@@ -655,6 +655,8 @@
Loading
655 655
    int		dofold)	    // also recompute the folds
656 656
{
657 657
    win_T	*wp;
658 +
    win_T	*wp_other = NULL;
659 +
    int		used_max_fill = FALSE;
658 660
    int		n;
659 661
660 662
    need_diff_redraw = FALSE;
@@ -662,6 +664,8 @@
Loading
662 664
	if (wp->w_p_diff)
663 665
	{
664 666
	    redraw_win_later(wp, SOME_VALID);
667 +
	    if (wp != curwin)
668 +
		wp_other = wp;
665 669
#ifdef FEAT_FOLDING
666 670
	    if (dofold && foldmethodIsDiff(wp))
667 671
		foldUpdateAll(wp);
@@ -674,10 +678,19 @@
Loading
674 678
		if (wp->w_topfill > n)
675 679
		    wp->w_topfill = (n < 0 ? 0 : n);
676 680
		else if (n > 0 && n > wp->w_topfill)
681 +
		{
677 682
		    wp->w_topfill = n;
683 +
		    if (wp == curwin)
684 +
			used_max_fill = TRUE;
685 +
		}
678 686
		check_topfill(wp, FALSE);
679 687
	    }
680 688
	}
689 +
690 +
    if (wp_other != NULL && used_max_fill && curwin->w_p_scb)
691 +
	// The current window was set to used the maximum number of filler
692 +
	// lines, may need to reduce them.
693 +
	diff_set_topline(wp_other, curwin);
681 694
}
682 695
683 696
    static void

@@ -535,6 +535,10 @@
Loading
535 535
    void
536 536
set_topline(win_T *wp, linenr_T lnum)
537 537
{
538 +
#ifdef FEAT_DIFF
539 +
    linenr_T prev_topline = wp->w_topline;
540 +
#endif
541 +
538 542
#ifdef FEAT_FOLDING
539 543
    // go to first of folded lines
540 544
    (void)hasFoldingWin(wp, lnum, &lnum, NULL, TRUE, NULL);
@@ -546,7 +550,9 @@
Loading
546 550
    wp->w_topline = lnum;
547 551
    wp->w_topline_was_set = TRUE;
548 552
#ifdef FEAT_DIFF
549 -
    wp->w_topfill = 0;
553 +
    if (lnum != prev_topline)
554 +
	// Keep the filler lines when the topline didn't change.
555 +
	wp->w_topfill = 0;
550 556
#endif
551 557
    wp->w_valid &= ~(VALID_WROW|VALID_CROW|VALID_BOTLINE|VALID_TOPLINE);
552 558
    // Don't set VALID_TOPLINE here, 'scrolloff' needs to be checked.

@@ -755,6 +755,8 @@
Loading
755 755
756 756
static int included_patches[] =
757 757
{   /* Add new patch number below this line */
758 +
/**/
759 +
    3394,
758 760
/**/
759 761
    3393,
760 762
/**/
Files Coverage
src 90.15%
Project Totals (151 files) 90.15%
1190480863
huge-gcc-testgui
1190480863
huge-gcc-unittests
1190480863
huge-gcc-none
1190480863
huge-clang-none

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading