tvi: move xoff before EOL after motions - neatvi - [fork] simple vi-type editor with UTF-8 support | |
git clone git://src.adamsgaard.dk/neatvi | |
Log | |
Files | |
Refs | |
README | |
--- | |
commit 51394946699311750dfd04dc04f756ccd6e05ab0 | |
parent 34c48c51241cd630685f387cef89b41cb4415d69 | |
Author: Ali Gholami Rudi | |
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(-) --- | |
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) { |