From 45c0f51cb3e226010f3ed9d5a90ca5ea87242699 Mon Sep 17 00:00:00 2001 From: Aaron Fischer Date: Thu, 18 Oct 2018 13:27:51 +0200 Subject: [PATCH] Update screen when terminal window will be changed #2 --- fn | Bin 28576 -> 28664 bytes fn.c | 21 +++++++++++++++++++-- terminal.c | 3 ++- terminal.h | 2 +- 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/fn b/fn index 3982dfef10007ce8756cc7ab69272b722fc075fd..957b7451c82629d875bd46a8fbd47d0df47aac83 100755 GIT binary patch delta 9335 zcmZu%3tW_C)_>o@7XbxkfPopV1A+>ofQo>Z9MsW4&1;moyDBLaX zKeMfN$=cF1*JQUvNtT})d{xoQXe~A}Imjo(`Nf}D^fL>~Nl`G%{ zRSm29Ebuk8tmniTV!k?~Oc9zd1EAjVFC&ob`9IFsA=rJP`*D-#ak z@DXFosM2f}xPfs9V@2Q^#-WT`f8qLj81sv0z98^hj4h0t1m4OxjB&lde`Xxccz2l~ zHZl>xM5VxgVr*qxA@Cm=M>1Y1@KcPV7|$1YA!8fk83I4X*v@!@zz;EwX6zJrD&rW& zWtoDQ#6&C;4uMBAj$>>Vco^e&#)`lL87DAq{h4Q=FJlMe3j(JxPGsC9a1!Gr#`VBi zR|-7Gr@1{}y31oPwobUOpt1hKJx;~lxPPS(jd~su%la<;7`#5>V^mcZhZnj%m%LA* ztpnNz!|Bf<_xm3j>QuZ@bTg#bb@jH-hh%*Vu1MC<)jN?rz&y`x-D!4vTo(X!1KI#j z11>k91F#A3ajFcBR)^7hp|NTTokkfzH$r==WfX6&Qd{VRIa3`?ewJBkAw6nIRo|nH zmXYd3I%7$V8GXy=(_QtdtF_T}U8H`6N%Y{Vlj6dv)WLK->?O5=9uHrlo~BFTzgN4^ zu!z^KdxkiayoMEh+2Q-AZO_l6ryqS@Tmj!N3o?*qeQLd=t?Ia2#-L zAGUcKy%qF|^-pRs^^8nWr_;E|=&08RI~4SXE4QSgiDY2ib)AY*!Z9U{-i2*GUpe}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8{$$}H+A z;aN*7$}HArrRN@-;TbQ-;YIezdPiE%4l=AZX+0?UX|i9tW&C5J_I+ZKaEr*RSQ>fa z(U%`N_YK8`&V3m{)8@bD$j%w1tStZaqKdKy7MCrqT)HTIWOh!DvbcO@RoRmAs)Y|Q z9;sARKD=mQRpqj!46~IL)sROt;Y?N>2e8V=Fwk;c_&ZOhZlK%~bIj&v+ diff --git a/fn.c b/fn.c index 526728a..1037cff 100644 --- a/fn.c +++ b/fn.c @@ -16,6 +16,7 @@ #include #include #include +#include #include "fn.h" #include "terminal.h" @@ -847,6 +848,18 @@ void editorProcessKeypress() { /*** init ***/ +void windowResizeCallback(int signum) { + if (signum != SIGWINCH) { + return; + } + + if (setWindowSize(&E.screenrows, &E.screencols) == -1) { + die("setWindowSize"); + } + E.screenrows -= 2; + editorRefreshScreen(); +} + void initEditor() { E.cx = 0; E.cy = 0; @@ -861,12 +874,14 @@ void initEditor() { E.statusmsg_time = 0; E.syntax = NULL; - if (getWindowSize(&E.screenrows, &E.screencols) == -1) - die("getWindowSize"); + if (setWindowSize(&E.screenrows, &E.screencols) == -1) { + die("setWindowSize"); + } E.screenrows -= 2; } int main(int argc, char *argv[]) { + enableRawMode(); initEditor(); if (argc >= 2) { @@ -875,6 +890,8 @@ int main(int argc, char *argv[]) { editorSetStatusMessage("HELP: Ctrl-S = save | Ctrl-Q = Quit | Ctrl-F = find"); + signal(SIGWINCH, windowResizeCallback); + while (1) { editorRefreshScreen(); editorProcessKeypress(); diff --git a/terminal.c b/terminal.c index 318bacf..3e2ed31 100644 --- a/terminal.c +++ b/terminal.c @@ -107,7 +107,7 @@ int getCursorPosition(int *rows, int *cols) { return 0; } -int getWindowSize(int *rows, int *cols) { +int setWindowSize(int *rows, int *cols) { struct winsize ws; if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &ws) == -1 || ws.ws_col == 0) { @@ -123,3 +123,4 @@ int getWindowSize(int *rows, int *cols) { return 0; } } + diff --git a/terminal.h b/terminal.h index 05a5cb0..6131349 100644 --- a/terminal.h +++ b/terminal.h @@ -8,6 +8,6 @@ void enableRawMode(); int editorReadKey(); int getCursorPosition(int *rows, int *cols); -int getWindowSize(int *rows, int *cols); +int setWindowSize(int *rows, int *cols); #endif