pkgsrc-WIP-changes archive

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

tig: Add a workaround for graphical artifacts documented in TODO



Module Name:	pkgsrc-wip
Committed By:	Leonardo Taccari <leot%NetBSD.org@localhost>
Pushed By:	leot
Date:		Tue May 14 22:45:25 2019 +0200
Changeset:	abf407bdb80231c9bfca153bedca196d2344e521

Modified Files:
	tig/TODO
	tig/distinfo
Added Files:
	tig/patches/patch-src_view.c

Log Message:
tig: Add a workaround for graphical artifacts documented in TODO

Instead of just redrawing last two lines always redraw the entire
view in move_view().

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=abf407bdb80231c9bfca153bedca196d2344e521

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 tig/TODO                     |  3 ++-
 tig/distinfo                 |  1 +
 tig/patches/patch-src_view.c | 39 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 42 insertions(+), 1 deletion(-)

diffs:
diff --git a/tig/TODO b/tig/TODO
index cffece28c2..a1c95e62d0 100644
--- a/tig/TODO
+++ b/tig/TODO
@@ -7,4 +7,5 @@
    + press down arrow
   After that the `main' view is mostly completely blank except for the current
   two entries.
-    -- leot (2019/05/06)
+  patch-src_view.c workarounds that.
+    -- leot (2019/05/14)
diff --git a/tig/distinfo b/tig/distinfo
index 91955dcf2c..4ad0d6c632 100644
--- a/tig/distinfo
+++ b/tig/distinfo
@@ -6,3 +6,4 @@ SHA512 (tig-2.4.1.tar.gz) = 516114ed267a9459e356ca1af35c9eba521f9a11e9462cc5120c
 Size (tig-2.4.1.tar.gz) = 1181900 bytes
 SHA1 (patch-aa) = 304457804ce9a342e903ec25c1d7d6d9cf353cf5
 SHA1 (patch-include_tig_tig.h) = 42803e6589f97b6ad0230d0d895c429e1525476b
+SHA1 (patch-src_view.c) = f6aa68992ebe79ce8fbf161afcb0dfc52f7e4881
diff --git a/tig/patches/patch-src_view.c b/tig/patches/patch-src_view.c
new file mode 100644
index 0000000000..1f315d44aa
--- /dev/null
+++ b/tig/patches/patch-src_view.c
@@ -0,0 +1,39 @@
+$NetBSD$
+
+Always redraw the entire view instead of only two lines.
+
+With NetBSD curses(3) where `main' and `diff' views are present only the current
+two entries are visible in the `main' view.  To reproduce that, after invoking
+`tig':
+
+ - press enter
+ - press down arrow
+
+Workaround that by redrawing the entire view.
+
+--- src/view.c.orig	2018-07-27 03:18:19.000000000 +0000
++++ src/view.c
+@@ -262,17 +262,23 @@ move_view(struct view *view, enum reques
+ 		return;
+ 	}
+ 
++	redraw_view(view);
++
++#if 0
+ 	/* Repaint the old "current" line if we be scrolling */
+ 	if (ABS(steps) < view->height)
+ 		draw_view_line(view, view->pos.lineno - steps - view->pos.offset);
++#endif
+ 
+ 	if (scroll_steps) {
+ 		do_scroll_view(view, scroll_steps);
+ 		return;
+ 	}
+ 
++#if 0
+ 	/* Draw the current line */
+ 	draw_view_line(view, view->pos.lineno - view->pos.offset);
++#endif
+ 
+ 	wnoutrefresh(view->win);
+ 	report_clear();


Home | Main Index | Thread Index | Old Index