[dev] [st] [PATCH] Clear the full screen on reverse terminal mode change.

From: Colona <colona_AT_ycc.fr>
Date: Fri, 9 May 2014 07:27:57 +0200

Fix a bug introduced by 0dbf9c8c12a5de35d1cef22349ab80e8f0a8f10e
(introduction of term.dirty) which, on change of reverse mode (DECSCNM),
caused only dirty lines to be redrawn with the new mode instead of the
whole screen.
A good test-case is `echo foobar; tput flash`.
---
 st.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/st.c b/st.c
index fe44608..8706759 100644
--- a/st.c
+++ b/st.c
_AT_@ -1781,8 +1781,10 @@ tsetmode(bool priv, bool set, int *args, int narg) {
 			case 5: /* DECSCNM -- Reverse video */
 				mode = term.mode;
 				MODBIT(term.mode, set, MODE_REVERSE);
-				if(mode != term.mode)
+				if(mode != term.mode) {
+					tfulldirt();
 					redraw(REDRAW_TIMEOUT);
+				}
 				break;
 			case 6: /* DECOM -- Origin */
 				MODBIT(term.c.state, set, CURSOR_ORIGIN);
-- 
1.9.2
-- 
Ivan "Colona" Delalande
Received on Fri May 09 2014 - 07:27:57 CEST

This archive was generated by hypermail 2.3.0 : Fri May 09 2014 - 07:36:06 CEST