| tled: output LNPREF before each line - neatvi - [fork] simple vi-type editor with UTF-8 support |
| git clone git://src.adamsgaard.dk/neatvi |
| Log |
| Files |
| Refs |
| README |
| --- |
| commit 5e1f787eec332dcdf9f3608c0745551d5de72ad4 |
| parent 10f95a93f415196040f45fd84924244856dcfff0 |
| Author: Ali Gholami Rudi |
| Date: Tue, 30 Nov 2021 20:55:12 +0330
led: output LNPREF before each line
Diffstat:
M conf.c | 5 +++++
M conf.h | 9 ++++++---
M led.c | 1 +
M vi.h | 1 +
4 files changed, 13 insertions(+), 3 deletions(-)
--- |
| diff --git a/conf.c b/conf.c |
| t@@ -106,3 +106,8 @@ char *conf_digraph(int c1, int c2)
return digraphs[i][1];
return NULL;
}
+
+char *conf_lnpref(void)
+{
+ return LNPREF;
+} |
| diff --git a/conf.h b/conf.h |
| t@@ -1,7 +1,7 @@
/* neatvi configuration file */
/* access mode of new files */
-#define MKFILE_MODE 0600
+#define MKFILE_MODE 0600
/* map file names to file types */
static struct filetype {
t@@ -118,10 +118,13 @@ static struct highlight {
};
/* how to hightlight current line (hll option) */
-#define SYN_LINE (SYN_BGMK(11))
+#define SYN_LINE (SYN_BGMK(11))
/* how to hightlight text in the reverse direction */
-#define SYN_REVDIR (SYN_BGMK(7))
+#define SYN_REVDIR (SYN_BGMK(7))
+
+/* define it as "\33[8l" to disable BiDi in vte-based terminals */
+#define LNPREF ""
/* right-to-left characters (used only in dircontexts[] and dirmarks[]) */
#define CR2L "ءآأؤإئابةتثجحخدذرزسشصضطظعغـفقكلمنهوىييپچژکگی؛،»«؟ًٌٍَُِّْ" |
| diff --git a/led.c b/led.c |
| t@@ -87,6 +87,7 @@ static char *led_render(char *s0, int cbeg, int cend, char *syn)
led_markrev(n, chrs, pos, att);
/* generate term output */
out = sbuf_make();
+ sbuf_str(out, conf_lnpref());
i = cbeg;
while (i < cend) {
int o = off[i - cbeg]; |
| diff --git a/vi.h b/vi.h |
| t@@ -194,6 +194,7 @@ int conf_mode(void);
char **conf_kmap(int id);
int conf_kmapfind(char *name);
char *conf_digraph(int c1, int c2);
+char *conf_lnpref(void);
/* global variables */
extern int xrow; |