tvi: move xoff before EOL after motions - 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 51394946699311750dfd04dc04f756ccd6e05ab0
 (DIR) parent 34c48c51241cd630685f387cef89b41cb4415d69
 (HTM) Author: Ali Gholami Rudi <ali@rudi.ir>
       Date:   Sat, 30 May 2015 00:40:15 +0430
       
       vi: move xoff before EOL after motions
       
       Diffstat:
         M vi.c                                |       4 ++--
       
       1 file changed, 2 insertions(+), 2 deletions(-)
       ---
 (DIR) diff --git a/vi.c b/vi.c
       t@@ -942,9 +942,9 @@ static void vi(void)
                                        noff = lbuf_indents(xb, xrow);
                                if (strchr("jk", mv))
                                        noff = vi_col2off(xb, xrow, xcol);
       -                        xoff = noff;
       +                        xoff = ren_noeol(lbuf_get(xb, xrow), noff);
                                if (!strchr("|jk", mv))
       -                                xcol = vi_off2col(xb, xrow, noff);
       +                                xcol = vi_off2col(xb, xrow, xoff);
                                if (mv == '|')
                                        xcol = vi_pcol;
                        } else if (mv == 0) {