On 2019-01-03, Bram Moolenaar wrote: > Gary Johnson wrote: > > > On 2019-01-03, Bram Moolenaar wrote: > > > Dominique wrote: > > > > > > > Gary Johnson <[email protected]> wrote: > > > > > > > > > I just built Vim 8.1.682 and am seeing a problem with 'spell' I have > > > > > not seen before. In this sentence, > > > > > > > > > > The quock brown fox jimped over the lazy dogs > > > > > > > > > > the second and fifth words are misspelled. In older versions of > > > > > vim, such as 8.1.497, with 'spell' enabled, only those two words are > > > > > highlighted. In 8.1.682, everything from the second word to the end > > > > > of the line is highlighted. > > > > > > > > > > I started vim as > > > > > > > > > > vim -N -u NONE -i NONE -c 'set spell' misspelling > > > > > > > > > > The previous version I built was 8.1.655 and I'm pretty sure, though > > > > > not positive, that 'spell' had no problem then. > > > > > > > > I see that spell checking is wrong since vim-8.1.665 (it was > > > > correct in vim-8.1.664): > > > > > > > > ==== > > > > commit c6d86dccc4edff8627e309fb23dc8f810ef36b28 > > > > Author: Bram Moolenaar <[email protected]> > > > > Date: Mon Dec 31 13:57:36 2018 +0100 > > > > > > > > patch 8.1.0665: text property display wrong when 'spell' is set > > > > > > > > Problem: Text property display wrong when 'spell' is set. > > > > (Dominique Pelle) > > > > Solution: Remove unnecessary assignment to char_attr. Combine > > > > attributes if > > > > needed. Add a screenshot test. > > > > ==== > > > > > > > > I can reproduce incorrect highlighting with: > > > > > > > > $ echo "This is a ttest of spell checking." | \ > > > > vim --clean -c 'set spell spelllang=en' - > > > > > > > > >From Vim-8.1.665, the whole line from "ttest" is wrongly highlighted as > > > > a spelling mistake. > > > > > > > > In Vim-8.1.664, only the incorrect word "ttest" was correctly > > > > highlighted > > > > as spelling mistake. > > > > > > It depends on other things, such as whether syntax highlighting is > > > enabled. Figuring out the attributes to use has become a bit of a > > > puzzle, with all the individual features that have been added over time. > > > Cleaning it up will be tricky. > > > > > > Instead of undoing the change from patch 665, I changed the condition > > > for the lines that figures out the initial value of char_attr. > > > Hopefully that fixes it without side effects. > > > > Thank you. That problem appears to be fixed. Now, however, I see > > another problem (with 8.1.685) with SpellCaps highlighting: words > > at the start of what Vim thinks are sentences are highlighted > > inconsistently. > > > > For example, start vim as: > > > > vim -N -u NONE -i NONE -c 'set spell' > > > > Insert the following into the buffer: > > > > the > > quick > > brown > > > > fox > > jumped > > over > > > > "the" is highlighted as SpellCaps, but "fox" is not. Typing Ctrl-L > > causes "fox" to be highlighted now as SpellCaps as well. Editing > > "fox" to change it to "fix" removes the highlighting. > > > > I am typing this on another system that is running vim 8.1.497. The > > behavior of SpellCaps highlighting is different here when typing the > > same two paragraphs. Here, "the" is highlighted until the q in > > "quick" is typed, and "fox" is highlighted until the j in "jumped" > > is typed. Again though, both "the" and "fox" are re-highlighted as > > SpellCaps after Ctrl-L is typed. > > Is this any different from before (e.g. Vim 8.1)? > > The thing is that the Capitalization error requires the spell checking > to start in the previous line, so that the "end of sentence" is > recognized. When redrawing only one line, this doesn't happen. > This is a bit of an optimization thing, it would require always to > redraw an extra line above the line actually needing to be redrawn. > I don't think this changed.
The newest Vim I have access to that is older than 8.1.497 is 8.0.1453 (the default on Ubuntu 18.04). It behaves the same as the new 8.1.685. So I guess this behavior hasn't changed; I just noticed it because I was looking for spell highlighting oddities. I don't have strong feelings about this SpellCap highlighting, so leaving it as-is is fine with me. Regards, Gary -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
