tled: fix cursor position for ex inputs - 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 d66f358f77184dde6bdfe021d09f7f3a01441f1a
 (DIR) parent 7476ff70d0c864ceb797f8d85afe0596e5957e95
 (HTM) Author: Ali Gholami Rudi <ali@rudi.ir>
       Date:   Wed, 13 May 2015 11:10:43 +0430
       
       led: fix cursor position for ex inputs
       
       Diffstat:
         M led.c                               |       4 ++--
       
       1 file changed, 2 insertions(+), 2 deletions(-)
       ---
 (DIR) diff --git a/led.c b/led.c
       t@@ -107,11 +107,11 @@ static void led_printparts(char *pref, char *main, char *post)
                } else {
                        int len = sbuf_len(ln);
                        sbuf_str(ln, keymap(led_kmap, 'a'));
       -                pos = ren_pos(sbuf_buf(ln), off);
       +                pos = ren_cursor(sbuf_buf(ln), ren_pos(sbuf_buf(ln), off));
                        sbuf_cut(ln, len);
                }
                led_print(sbuf_buf(ln), -1);
       -        term_pos(-1, led_pos(sbuf_buf(ln), ren_cursor(sbuf_buf(ln), pos)));
       +        term_pos(-1, led_pos(sbuf_buf(ln), pos));
                sbuf_free(ln);
        }