From 51394946699311750dfd04dc04f756ccd6e05ab0 Mon Sep 17 00:00:00 2001 From: Ali Gholami Rudi Date: Sat, 30 May 2015 00:40:15 +0430 Subject: [PATCH] vi: move xoff before EOL after motions --- vi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vi.c b/vi.c index d8df0e9..c2bf264 100644 --- a/vi.c +++ b/vi.c @@ -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) { -- 2.11.4.GIT