To: vim-dev@vim.org Subject: Patch 6.4.008 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.4.008 Problem: Hang in search for 'hlsearch' highlighting. (Yukihiro Nakadaira) Solution: Skip over (multi-byte) character instead of single byte. Files: src/screen.c *** ../vim-6.4.007/src/screen.c Wed Jan 19 11:03:00 2005 --- src/screen.c Sat Feb 25 14:34:41 2006 *************** *** 5803,5814 **** || (shl->rm.endpos[0].lnum == 0 && shl->rm.endpos[0].col == shl->rm.startpos[0].col)) { ! matchcol = shl->rm.startpos[0].col + 1; ! if (ml_get_buf(shl->buf, lnum, FALSE)[matchcol - 1] == NUL) { shl->lnum = 0; break; } } else matchcol = shl->rm.endpos[0].col; --- 5803,5824 ---- || (shl->rm.endpos[0].lnum == 0 && shl->rm.endpos[0].col == shl->rm.startpos[0].col)) { ! char_u *ml; ! ! matchcol = shl->rm.startpos[0].col; ! ml = ml_get_buf(shl->buf, lnum, FALSE) + matchcol; ! if (*ml == NUL) { + ++matchcol; shl->lnum = 0; break; } + #ifdef FEAT_MBYTE + if (has_mbyte) + matchcol += mb_ptr2len_check(ml); + else + #endif + ++matchcol; } else matchcol = shl->rm.endpos[0].col; *** ../vim-6.4.007/src/version.c Wed Feb 8 11:11:51 2006 --- src/version.c Sat Feb 25 14:37:36 2006 *************** *** 643,644 **** --- 643,646 ---- { /* Add new patch number below this line */ + /**/ + 8, /**/ -- Team-building exercises come in many forms but they all trace their roots back to the prison system. In your typical team-building exercise the employees are subjected to a variety of unpleasant situations until they become either a cohesive team or a ring of car jackers. (Scott Adams - The Dilbert principle) /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ download, build and distribute -- http://www.A-A-P.org /// \\\ help me help AIDS victims -- http://www.ICCF.nl ///