diff src/search.c @ 3693:c612d154bcdd v7.3.606

updated for version 7.3.606 Problem: CTRL-P completion has a problem with multi-byte characters. Solution: Check for next character being NUL properly. (Yasuhiro Matsumoto)
author Bram Moolenaar <bram@vim.org>
date Thu, 19 Jul 2012 17:18:26 +0200
parents 5c1aaf9b4b1b
children d29aa05b7e31
line wrap: on
line diff
--- a/src/search.c
+++ b/src/search.c
@@ -5141,7 +5141,7 @@ exit_matched:
 		    && !(compl_cont_status & CONT_SOL)
 #endif
 		    && *startp != NUL
-		    && *(p = startp + 1) != NUL)
+		    && *(p = startp + MB_PTR2LEN(startp)) != NUL)
 		goto search_line;
 	}
 	line_breakcheck();