tvi: use ren_noeol() for column number in put command - neatvi - [fork] simple vi-type editor with UTF-8 support
git clone git://src.adamsgaard.dk/neatvi
Log
Files
Refs
README
---
commit a1a91f49480b499d8ad0c64a37554e7677db483c
parent 6f05dff38aadda562cfbcf7532af2119a0e8d998
Author: Ali Gholami Rudi 
Date:   Wed, 20 May 2015 19:05:47 +0430

vi: use ren_noeol() for column number in put command

Diffstat:
  M vi.c                                |       2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/vi.c b/vi.c
t@@ -872,7 +872,7 @@ static int vc_put(int cmd)
         if (!buf)
                 return 1;
         ln = lnmode ? NULL : lbuf_get(xb, xrow);
-        off = vi_insertionoffset(ln, xcol, cmd == 'P');
+        off = vi_insertionoffset(ln, ren_noeol(ln, xcol), cmd == 'P');
         if (cmd == 'p' && !ln)
                 xrow++;
         sb = sbuf_make();