Patch 8.2.0956 (after 8.2.0953)
Problem:    Spell test fails.
Solution:   Add missing change the spell checking.
Files:      src/spell.c


*** ../vim-8.2.0955/src/spell.c 2020-06-10 15:32:04.455653633 +0200
--- src/spell.c 2020-06-10 21:33:53.462633840 +0200
***************
*** 173,178 ****
--- 173,180 ----
      int               wrongcaplen = 0;
      int               lpi;
      int               count_word = docount;
+     int               use_camel_case = *wp->w_s->b_p_spo != NUL;
+     int               camel_case = 0;
  
      // A word never starts at a space or a control character.  Return quickly
      // then, skipping over the character.
***************
*** 204,212 ****
      mi.mi_fend = ptr;
      if (spell_iswordp(mi.mi_fend, wp))
      {
        do
            MB_PTR_ADV(mi.mi_fend);
!       while (*mi.mi_fend != NUL && spell_iswordp(mi.mi_fend, wp));
  
        if (capcol != NULL && *capcol == 0 && wp->w_s->b_cap_prog != NULL)
        {
--- 206,232 ----
      mi.mi_fend = ptr;
      if (spell_iswordp(mi.mi_fend, wp))
      {
+       int prev_upper;
+       int this_upper;
+ 
+       if (use_camel_case)
+       {
+           c = PTR2CHAR(mi.mi_fend);
+           this_upper = SPELL_ISUPPER(c);
+       }
+ 
        do
+       {
            MB_PTR_ADV(mi.mi_fend);
!           if (use_camel_case)
!           {
!               prev_upper = this_upper;
!               c = PTR2CHAR(mi.mi_fend);
!               this_upper = SPELL_ISUPPER(c);
!               camel_case = !prev_upper && this_upper;
!           }
!       } while (*mi.mi_fend != NUL && spell_iswordp(mi.mi_fend, wp)
!                                                              && !camel_case);
  
        if (capcol != NULL && *capcol == 0 && wp->w_s->b_cap_prog != NULL)
        {
***************
*** 237,242 ****
--- 257,266 ----
                                                             MAXWLEN + 1);
      mi.mi_fwordlen = (int)STRLEN(mi.mi_fword);
  
+     if (camel_case)
+       // Introduce a fake word end space into the folded word.
+       mi.mi_fword[mi.mi_fwordlen - 1] = ' ';
+ 
      // The word is bad unless we recognize it.
      mi.mi_result = SP_BAD;
      mi.mi_result2 = SP_BAD;
*** ../vim-8.2.0955/src/version.c       2020-06-10 22:11:59.922786692 +0200
--- src/version.c       2020-06-10 22:17:16.561791496 +0200
***************
*** 756,757 ****
--- 756,759 ----
  {   /* Add new patch number below this line */
+ /**/
+     956,
  /**/

-- 
Futility Factor: No experiment is ever a complete failure - it can always
serve as a negative example.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202006102018.05AKINMn954876%40masaka.moolenaar.net.

Raspunde prin e-mail lui