Mirror of the Vim source from https://github.com/vim/vim
修訂 | 3ee896333e3eebba8a5e10e04649f1bd20e98770 (tree) |
---|---|
時間 | 2008-04-02 00:14:36 |
作者 | vimboss |
Commiter | vimboss |
updated for version 7.1-290
@@ -2268,6 +2268,8 @@ | ||
2268 | 2268 | /* |
2269 | 2269 | * For spell checking: concatenate the start of the following line "line" into |
2270 | 2270 | * "buf", blanking-out special characters. Copy less then "maxlen" bytes. |
2271 | + * Keep the blanks at the start of the next line, this is used in win_line() | |
2272 | + * to skip those bytes if the word was OK. | |
2271 | 2273 | */ |
2272 | 2274 | void |
2273 | 2275 | spell_cat_line(buf, line, maxlen) |
@@ -2284,12 +2286,14 @@ | ||
2284 | 2286 | |
2285 | 2287 | if (*p != NUL) |
2286 | 2288 | { |
2287 | - *buf = ' '; | |
2288 | - vim_strncpy(buf + 1, line, maxlen - 2); | |
2289 | - n = (int)(p - line); | |
2290 | - if (n >= maxlen) | |
2291 | - n = maxlen - 1; | |
2292 | - vim_memset(buf + 1, ' ', n); | |
2289 | + /* Only worth concatenating if there is something else than spaces to | |
2290 | + * concatenate. */ | |
2291 | + n = (int)(p - line) + 1; | |
2292 | + if (n < maxlen - 1) | |
2293 | + { | |
2294 | + vim_memset(buf, ' ', n); | |
2295 | + vim_strncpy(buf + n, p, maxlen - 1 - n); | |
2296 | + } | |
2293 | 2297 | } |
2294 | 2298 | } |
2295 | 2299 |
@@ -667,6 +667,8 @@ | ||
667 | 667 | static int included_patches[] = |
668 | 668 | { /* Add new patch number below this line */ |
669 | 669 | /**/ |
670 | + 290, | |
671 | +/**/ | |
670 | 672 | 289, |
671 | 673 | /**/ |
672 | 674 | 288, |