To: vim-dev@vim.org Subject: Patch 6.0.182 Fcc: outbox From: Bram Moolenaar MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.0.182 Problem: When using a regexp on multi-byte characters, could try to read a character before the start of the line. Solution: Don't decrement a pointer to before the start of the line. Files: src/regexp.c *** ../vim60.181/src/regexp.c Mon Jan 28 14:06:05 2002 --- src/regexp.c Mon Feb 4 21:54:50 2002 *************** *** 3898,3905 **** reg_restore(&save); } /* Couldn't or didn't match -- back up one char. */ ! --count; ! if (reginput == regline && count >= minval) { /* backup to last char of previous line */ --reglnum; --- 3898,3906 ---- reg_restore(&save); } /* Couldn't or didn't match -- back up one char. */ ! if (--count < minval) ! break; ! if (reginput == regline) { /* backup to last char of previous line */ --reglnum; *** ../vim60.181/src/version.c Mon Feb 4 22:41:08 2002 --- src/version.c Mon Feb 4 22:41:59 2002 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 182, /**/ -- Your mouse has moved. Windows must be restarted for the change to take effect. Reboot now? /// Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net \\\ ((( Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim ))) \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///