From 67acf2c7537573eb6e90397d32f33ba3a3cec3f7 Mon Sep 17 00:00:00 2001 From: Chris Allegretta Date: Sun, 20 Jan 2013 07:51:34 +0000 Subject: [PATCH] 2013-01-20 Chris Allegretta * src/text.c (do_histify): Don't allow sigwinch to be received while justifying as that puts us into a wacky state. Fixess crash on justify by Joshua Rogers. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4565 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 4 ++++ src/text.c | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 85622029..5e3308ad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2013-01-20 Chris Allegretta + * src/text.c (do_histify): Don't allow sigwinch to be received while justifying + as that puts us into a wacky state. Fixess crash on justify by Joshua Rogers. + 2013-01-19 Chris Allegretta * configure.ac: Make ncursesw checking dependent on the presence of ncursesw.h, since without the header files we can't compile. diff --git a/src/text.c b/src/text.c index d8f80887..9bb7e4e0 100644 --- a/src/text.c +++ b/src/text.c @@ -1979,6 +1979,8 @@ void do_justify(bool full_justify) if (full_justify) openfile->current = openfile->fileage; + allow_pending_sigwinch(FALSE); + while (TRUE) { size_t i; /* Generic loop variable. */ @@ -2349,6 +2351,9 @@ void do_justify(bool full_justify) /* Display the shortcut list with UnCut. */ shortcut_init(FALSE); display_main_list(); + + allow_pending_sigwinch(TRUE); + } /* Justify the current paragraph. */ -- 2.39.5