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.

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.

Raspunde prin e-mail lui