Introduction
Introduction Statistics Contact Development Disclaimer Help
tled: messages and ex prompts are always left-to-right - neatvi - [fork] simple…
git clone git://src.adamsgaard.dk/neatvi
Log
Files
Refs
README
---
commit 33fa385f8aaee6daad8010fc875b2861d835d2c3
parent d9562b264f00d015c0bcd75bd8fa3e4cece9eddb
Author: Ali Gholami Rudi <[email protected]>
Date: Thu, 16 Mar 2017 15:42:08 +0330
led: messages and ex prompts are always left-to-right
Diffstat:
M led.c | 12 ++++++++++++
1 file changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/led.c b/led.c
t@@ -120,10 +120,20 @@ void led_print(char *s, int row)
free(r);
}
+/* set xdir and return its old value */
+static int dir_set(int dir)
+{
+ int old = xdir;
+ xdir = dir;
+ return old;
+}
+
/* print a line on the screen; for ex messages */
void led_printmsg(char *s, int row)
{
+ int dir = dir_set(+2);
char *r = led_render(s, xleft, xleft + xcols, "---");
+ dir_set(dir);
term_pos(row, 0);
term_kill();
term_str(r);
t@@ -297,7 +307,9 @@ static char *led_line(char *pref, char *post, char *ai, in…
char *led_prompt(char *pref, char *post, char **kmap)
{
int key;
+ int dir = dir_set(+2);
char *s = led_line(pref, post, "", 0, &key, kmap);
+ dir_set(dir);
if (key == '\n') {
struct sbuf *sb = sbuf_make();
if (pref)
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.