Mercurial > vim
comparison src/spell.c @ 26771:fc859aea8cec v8.2.3914
patch 8.2.3914: various spelling mistakes in comments
Commit: https://github.com/vim/vim/commit/af4a61a85d6e8cacc35324f266934bc463a21673
Author: Dominique Pelle <dominique.pelle@gmail.com>
Date: Mon Dec 27 17:21:41 2021 +0000
patch 8.2.3914: various spelling mistakes in comments
Problem: Various spelling mistakes in comments.
Solution: Fix the mistakes. (Dominique Pell?, closes https://github.com/vim/vim/issues/9416)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 27 Dec 2021 18:30:05 +0100 |
parents | 65ab0b035dd8 |
children | bce848ec8b1b |
comparison
equal
deleted
inserted
replaced
26770:15ff3f2e0d58 | 26771:fc859aea8cec |
---|---|
1499 return 0; | 1499 return 0; |
1500 } | 1500 } |
1501 | 1501 |
1502 /* | 1502 /* |
1503 * For spell checking: concatenate the start of the following line "line" into | 1503 * For spell checking: concatenate the start of the following line "line" into |
1504 * "buf", blanking-out special characters. Copy less then "maxlen" bytes. | 1504 * "buf", blanking-out special characters. Copy less than "maxlen" bytes. |
1505 * Keep the blanks at the start of the next line, this is used in win_line() | 1505 * Keep the blanks at the start of the next line, this is used in win_line() |
1506 * to skip those bytes if the word was OK. | 1506 * to skip those bytes if the word was OK. |
1507 */ | 1507 */ |
1508 void | 1508 void |
1509 spell_cat_line(char_u *buf, char_u *line, int maxlen) | 1509 spell_cat_line(char_u *buf, char_u *line, int maxlen) |
3258 { | 3258 { |
3259 // check all rules for the same letter | 3259 // check all rules for the same letter |
3260 for (; (s = smp[n].sm_lead)[0] == c; ++n) | 3260 for (; (s = smp[n].sm_lead)[0] == c; ++n) |
3261 { | 3261 { |
3262 // Quickly skip entries that don't match the word. Most | 3262 // Quickly skip entries that don't match the word. Most |
3263 // entries are less then three chars, optimize for that. | 3263 // entries are less than three chars, optimize for that. |
3264 k = smp[n].sm_leadlen; | 3264 k = smp[n].sm_leadlen; |
3265 if (k > 1) | 3265 if (k > 1) |
3266 { | 3266 { |
3267 if (word[i + 1] != s[1]) | 3267 if (word[i + 1] != s[1]) |
3268 continue; | 3268 continue; |
3549 // (c & 0xff) is NUL. | 3549 // (c & 0xff) is NUL. |
3550 for (; ((ws = smp[n].sm_lead_w)[0] & 0xff) == (c & 0xff) | 3550 for (; ((ws = smp[n].sm_lead_w)[0] & 0xff) == (c & 0xff) |
3551 && ws[0] != NUL; ++n) | 3551 && ws[0] != NUL; ++n) |
3552 { | 3552 { |
3553 // Quickly skip entries that don't match the word. Most | 3553 // Quickly skip entries that don't match the word. Most |
3554 // entries are less then three chars, optimize for that. | 3554 // entries are less than three chars, optimize for that. |
3555 if (c != ws[0]) | 3555 if (c != ws[0]) |
3556 continue; | 3556 continue; |
3557 k = smp[n].sm_leadlen; | 3557 k = smp[n].sm_leadlen; |
3558 if (k > 1) | 3558 if (k > 1) |
3559 { | 3559 { |
4031 // Normal char, go one level deeper. | 4031 // Normal char, go one level deeper. |
4032 word[depth++] = c; | 4032 word[depth++] = c; |
4033 arridx[depth] = idxs[n]; | 4033 arridx[depth] = idxs[n]; |
4034 curi[depth] = 1; | 4034 curi[depth] = 1; |
4035 | 4035 |
4036 // Check if this characters matches with the pattern. | 4036 // Check if this character matches with the pattern. |
4037 // If not skip the whole tree below it. | 4037 // If not skip the whole tree below it. |
4038 // Always ignore case here, dump_word() will check | 4038 // Always ignore case here, dump_word() will check |
4039 // proper case later. This isn't exactly right when | 4039 // proper case later. This isn't exactly right when |
4040 // length changes for multi-byte characters with | 4040 // length changes for multi-byte characters with |
4041 // ignore case... | 4041 // ignore case... |