changeset 2376:fc58ade2ad7e vim73

Fix: strdisplaywidth("x", 2) returned 3 instead of 1.
author Bram Moolenaar <bram@vim.org>
date Thu, 22 Jul 2010 22:20:57 +0200
parents a96dd77ce213
children 878562053ba3
files src/eval.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/eval.c
+++ b/src/eval.c
@@ -16820,7 +16820,7 @@ f_strdisplaywidth(argvars, rettv)
     if (argvars[1].v_type != VAR_UNKNOWN)
 	col = get_tv_number(&argvars[1]);
 
-    rettv->vval.v_number = (varnumber_T)(linetabsize_col(col, s));
+    rettv->vval.v_number = (varnumber_T)(linetabsize_col(col, s) - col);
 }
 
 /*