[mw-devel] [Git][arthur/mw][master] Explicitly tell readline when the term size changes

Andrew Price welshbyte at sucs.org
Mon Nov 19 14:11:29 GMT 2018


Andrew Price pushed to branch master at Justin Mitchell / mw


Commits:
20bbbda8 by Andrew Price at 2018-11-19T14:09:44+00:00
Explicitly tell readline when the term size changes

Apparently this is required since readline 6.3

- - - - -


1 changed file:

- src/client/main.c


Changes:

=====================================
src/client/main.c
=====================================
--- a/src/client/main.c
+++ b/src/client/main.c
@@ -279,13 +279,15 @@ static int match_arg_str(char *srch, const char *sub)
 }
 
 
-static void termcap_screenchange(int n)
+static void handle_sigwinch(int n)
 {
 	/* termcap not available */
 	if (g_boTermCap == 0) return;
 
 	/* reinitialise termcap */
 	tgetent(NULL, getenv("TERM"));
+	if (UseRL)
+		rl_resize_terminal();
 }
 
 
@@ -320,7 +322,7 @@ static void init_termcap(void)
 	g_boTermCap = 1;
 
 	/* set up a signal for screen size change, to allow termcap to be reinitialised */
-	signal(SIGWINCH, termcap_screenchange);
+	signal(SIGWINCH, handle_sigwinch);
 }
 
 static char *dummy_list(const char *text, int state)



View it on GitLab: https://projects.sucs.org/arthur/mw/commit/20bbbda89432d56458e8737226e3927c2443a1c3

-- 
View it on GitLab: https://projects.sucs.org/arthur/mw/commit/20bbbda89432d56458e8737226e3927c2443a1c3
You're receiving this email because of your account on projects.sucs.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sucs.org/pipermail/mw-devel/attachments/20181119/b8832abc/attachment.html>


More information about the mw-devel mailing list