Re: [ANNOUNCE] tig-0.14

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 20, 2009 at 18:24, Ted Pavlic <ted@xxxxxxxxxxxxx> wrote:
>> Looks like there might be a pattern and I might have an excuse to go
>> knock on the door of one of my "Mac" friends. ;) However, first I
>> would kindly ask if one of you have time to test the attached patch.
>
> Any verdict on this patch (it WFM)? I notice tig is still unpatched to fix
> this problem.

I didn't look more into it. Maybe you can try the attached patch for me.

-- 
Jonas Fonseca
From 270e894b59cac1baa3ee2cb4c12f320efb3fea30 Mon Sep 17 00:00:00 2001
From: Jonas Fonseca <fonseca@xxxxxxx>
Date: Tue, 10 Feb 2009 21:33:18 +0100
Subject: [PATCH] Fix regression where a line was not cleared when not selected anymore

Introduced in 273c28df2aa5cc0d122b1a0f3c0014a56ab8c392 (Tree view: make
drawing more smooth by using the dirty flag).
---
 tig.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/tig.c b/tig.c
index 2a3ab3a..fbbd1cc 100644
--- a/tig.c
+++ b/tig.c
@@ -2073,6 +2073,7 @@ draw_view_line(struct view *view, unsigned int lineno)
 {
 	struct line *line;
 	bool selected = (view->offset + lineno == view->lineno);
+	bool cleareol;
 
 	assert(view_is_displayed(view));
 
@@ -2080,10 +2081,9 @@ draw_view_line(struct view *view, unsigned int lineno)
 		return FALSE;
 
 	line = &view->line[view->offset + lineno];
+	cleareol = line->cleareol || (line->selected && !selected);
 
 	wmove(view->win, lineno, 0);
-	if (line->cleareol)
-		wclrtoeol(view->win);
 	view->col = 0;
 	view->curline = line;
 	view->curtype = LINE_NONE;
@@ -2094,6 +2094,11 @@ draw_view_line(struct view *view, unsigned int lineno)
 		set_view_attr(view, LINE_CURSOR);
 		line->selected = TRUE;
 		view->ops->select(view, line);
+	} else if (cleareol) {
+		/* FIXME: It is not strictly correct to only clear to
+		 * the line end for non-selected lines. However, no view
+		 * currently requires clearing for the first line. */
+		wclrtoeol(view->win);
 	}
 
 	return view->ops->draw(view, line, lineno);
-- 
1.6.2.rc1.209.gfe624.dirty


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux