From d1e19ff64598e0b5c6977c3f1437e17b8393f46a Mon Sep 17 00:00:00 2001 From: Joe Allen Date: Wed, 6 May 2026 10:01:32 -0400 Subject: [PATCH] Fix issue where aspell prevents restoration from alternate screen when exiting JOE --- joe/ublock.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/joe/ublock.c b/joe/ublock.c index 8a68ebeb..e2d3f89d 100644 --- a/joe/ublock.c +++ b/joe/ublock.c @@ -1170,7 +1170,11 @@ static int dofilt(W *w, char *s, void *object, int *notify) msgnw(bw->parent, joe_gettext(_("Couldn't create pipe"))); return -1; } - npartial(bw->parent->t->t); + /* npartial is less jarring... */ + /* npartial(bw->parent->t->t); */ + /* But we must use nescape if we are using the ti te sequences, otherwise + JOE doesn't return from alternate screen if aspell is used */ + nescape(bw->parent->t->t); ttclsn(); #ifdef HAVE_FORK if (!fork()) { @@ -1275,6 +1279,8 @@ static int dofilt(W *w, char *s, void *object, int *notify) } vsrm(s); ttopnn(); + /* Use nreturn because we now use nescape */ + nreturn(bw->parent->t->t); if (filtflg) unmark(bw->parent, 0); bw->cursor->xcol = piscol(bw->cursor);