tex: make text direction buffer local - 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 a8b14d8f0ccab1346466bbf91380d80d226171f6
(DIR) parent 7069bc1bd5c3c298b329b68f0a84f5b480b52896
(HTM) Author: Ali Gholami Rudi <ali@rudi.ir>
Date: Thu, 3 Sep 2020 16:03:05 +0430
ex: make text direction buffer local
Diffstat:
M ex.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
(DIR) diff --git a/ex.c b/ex.c
t@@ -31,7 +31,7 @@ static struct buf {
char ft[32];
char *path;
struct lbuf *lb;
- int row, off, top;
+ int row, off, top, td;
long mtime; /* modification time */
} bufs[8];
t@@ -73,6 +73,7 @@ static int bufs_open(char *path)
bufs[i].row = 0;
bufs[i].off = 0;
bufs[i].top = 0;
+ bufs[i].td = +1;
bufs[i].mtime = -1;
strcpy(bufs[i].ft, syn_filetype(path));
return i;
t@@ -96,6 +97,7 @@ static void bufs_switch(int idx)
xrow = bufs[0].row;
xoff = bufs[0].off;
xtop = bufs[0].top;
+ xtd = bufs[0].td;
}
char *ex_path(void)
t@@ -376,6 +378,7 @@ static int ec_edit(char *ec)
bufs[0].row = xrow;
bufs[0].off = xoff;
bufs[0].top = xtop;
+ bufs[0].td = xtd;
if (path[0] && bufs_find(path) >= 0) {
bufs_switch(bufs_find(path));
return 0;