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
@@ -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

Reply via email to