To: vim-dev@vim.org Subject: Patch 6.1.392 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.392 (depends on 6.1.383) Problem: Highlighting in the 'statusline' is in the wrong position when an item is tructated. (Zak Beck) Solution: Correct the start of 'statusline' items properly for a truncated item. Files: src/buffer.c *** ../vim61.391/src/buffer.c Sun Mar 9 22:39:19 2003 --- src/buffer.c Wed Mar 12 19:47:23 2003 *************** *** 3475,3481 **** s = out; else { - s = item[0].start; for ( ; l < itemcnt; l++) if (item[l].type == Trunc) { --- 3475,3480 ---- *************** *** 3483,3488 **** --- 3482,3493 ---- s = item[l].start; break; } + if (l == itemcnt) + { + /* No %< item, truncate first item. */ + s = item[0].start; + l = 0; + } } if (width - vim_strsize(s) > maxwidth) *************** *** 3541,3552 **** *s = NUL; } for (; l < itemcnt; l++) { ! if (item[l].start - n >= out) item[l].start -= n; else ! item[l].start = out; } } width = maxwidth; --- 3546,3558 ---- *s = NUL; } + --n; /* count the '<' */ for (; l < itemcnt; l++) { ! if (item[l].start - n >= s) item[l].start -= n; else ! item[l].start = s; } } width = maxwidth; *** ../vim61.391/src/version.c Fri Mar 14 22:45:22 2003 --- src/version.c Fri Mar 14 22:52:28 2003 *************** *** 613,614 **** --- 613,616 ---- { /* Add new patch number below this line */ + /**/ + 392, /**/ -- hundred-and-one symptoms of being an internet addict: 79. All of your most erotic dreams have a scrollbar at the right side. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///