Bug#620106: [patch] Fix off-by-one for justify.vim

2012-11-23 Thread Bram Moolenaar
James - > Hi Bram, > > As reported in Debian[0], macros/justify.vim doesn't always fully > correctly justify the text. This is due to a off-by-one in the justify > logic. The attached patch fixes this as well as updating the script to > use strdisplaywidth() instead of the strlen(substitute(s,

Bug#620106: [patch] Fix off-by-one for justify.vim

2012-11-23 Thread James McCoy
Hi Bram, As reported in Debian[0], macros/justify.vim doesn't always fully correctly justify the text. This is due to a off-by-one in the justify logic. The attached patch fixes this as well as updating the script to use strdisplaywidth() instead of the strlen(substitute(s, '.', 'x', 'g')) hack.