Fix a crash in TTY sessions caused by recent changes
authorEli Zaretskii <eliz@gnu.org>
Mon, 7 Oct 2019 18:22:03 +0000 (21:22 +0300)
committerEli Zaretskii <eliz@gnu.org>
Mon, 7 Oct 2019 18:22:03 +0000 (21:22 +0300)
* src/xdisp.c (redisplay_internal): Fix crashes in TTY
sessions when turning on tab-mode.
Reported by Ergus <spacibba@aol.com>.

src/xdisp.c

index 192bf010136eed9bc997413bdbe95c17e65ab0ab..29d49d57dfd10fe20e4ba07b2077d543068888d4 100644 (file)
@@ -15680,9 +15680,11 @@ redisplay_internal (void)
                  /* On some platforms (at least MS-Windows), the
                     scroll_run_hook called from scrolling_window
                     called from update_frame could set the frame's
-                    garbaged flag, in which case we need to
-                    redisplay the frame.  */
-                  if (FRAME_GARBAGED_P (f))
+                    garbaged flag, in which case we need to redisplay
+                    the frame.  Don't do that on TTY frames, since we
+                    need to keep the garbaged flag in that case when
+                    the frame has been resized.  */
+                  if (FRAME_WINDOW_P (f) && FRAME_GARBAGED_P (f))
                    {
                      fset_redisplay (f);
                      f->garbaged = false;