tvi: update terminal dimensions with ^L - neatvi - [fork] simple vi-type editor with UTF-8 support
 (HTM) git clone git://src.adamsgaard.dk/neatvi
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
       ---
 (DIR) commit 722ca21e37945ee1f8a7fb91022425f7ea8fcf3d
 (DIR) parent afd07cde72da1f78aed6b2319b346afe81a63b0a
 (HTM) Author: Ali Gholami Rudi <ali@rudi.ir>
       Date:   Mon, 25 Apr 2016 19:34:59 +0430
       
       vi: update terminal dimensions with ^L
       
       Suggested by Hamidreza Rabbanian <hamidreza.rabbanian@gmail.com>.
       
       Diffstat:
         M term.c                              |       4 ++--
         M vi.c                                |       2 ++
       
       2 files changed, 4 insertions(+), 2 deletions(-)
       ---
 (DIR) diff --git a/term.c b/term.c
       t@@ -26,8 +26,8 @@ void term_init(void)
                if (getenv("COLUMNS"))
                        cols = atoi(getenv("COLUMNS"));
                if (!ioctl(0, TIOCGWINSZ, &win)) {
       -                cols = cols ? cols : win.ws_col;
       -                rows = rows ? rows : win.ws_row;
       +                cols = win.ws_col;
       +                rows = win.ws_row;
                }
                cols = cols ? cols : 80;
                rows = rows ? rows : 25;
 (DIR) diff --git a/vi.c b/vi.c
       t@@ -1190,6 +1190,8 @@ static void vi(void)
                                                mod = 1;
                                        break;
                                case TK_CTL('l'):
       +                                term_done();
       +                                term_init();
                                        mod = 1;
                                        break;
                                case 'm':