To: vim-dev@vim.org Subject: Patch 6.1.157 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.157 Problem: 'hlsearch' highlights only the second comma in ",,,,," with "/,\@<=[^,]*". (Preben Guldberg) Solution: Also check for an empty match to start just after a previous match. Files: src/screen.c *** ../vim61.156/src/screen.c Sun Jul 21 20:58:30 2002 --- src/screen.c Sun Aug 18 16:34:13 2002 *************** *** 3036,3053 **** else shl->endp = line + MAXCOL; ! /* for a non-null match, loop to check if the ! * match starts at the current position */ ! if (shl->startp != shl->endp) ! continue; ! ! /* highlight empty match, try again after it */ ! #ifdef FEAT_MBYTE ! if (has_mbyte) ! shl->endp += (*mb_ptr2len_check)(shl->endp); ! else ! #endif ! ++shl->endp; } } break; --- 3036,3057 ---- else shl->endp = line + MAXCOL; ! if (shl->startp == shl->endp) ! { ! /* highlight empty match, try again after ! * it */ ! #ifdef FEAT_MBYTE ! if (has_mbyte) ! shl->endp += ! (*mb_ptr2len_check)(shl->endp); ! else ! #endif ! ++shl->endp; ! } ! ! /* Loop to check if the match starts at the ! * current position */ ! continue; } } break; *** ../vim61.156/src/version.c Sun Aug 18 16:05:35 2002 --- src/version.c Sun Aug 18 16:39:59 2002 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 157, /**/ -- hundred-and-one symptoms of being an internet addict: 231. You sprinkle Carpet Fresh on the rugs and put your vacuum cleaner in the front doorway permanently so it always looks like you are actually attempting to do something about that mess that has amassed since you discovered the Internet. /// Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net \\\ /// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim \\\ \\\ Project leader for A-A-P -- http://www.a-a-p.org /// \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///