Patch 8.2.2011
Problem:    "syn sync" reports a very large number.
Solution:   Use "at the first line".
Files:      src/syntax.c, src/testdir/test_syntax.vim


*** ../vim-8.2.2010/src/syntax.c        2020-09-13 22:37:30.576176018 +0200
--- src/syntax.c        2020-11-18 16:50:47.443488664 +0100
***************
*** 3869,3877 ****
                msg_puts(_("no syncing"));
            else
            {
!               msg_puts(_("syncing starts "));
!               msg_outnum(curwin->w_s->b_syn_sync_minlines);
!               msg_puts(_(" lines before top line"));
                syn_match_msg();
            }
            return;
--- 3869,3882 ----
                msg_puts(_("no syncing"));
            else
            {
!               if (curwin->w_s->b_syn_sync_minlines == MAXLNUM)
!                   msg_puts(_("syncing starts at the first line"));
!               else
!               {
!                   msg_puts(_("syncing starts "));
!                   msg_outnum(curwin->w_s->b_syn_sync_minlines);
!                   msg_puts(_(" lines before top line"));
!               }
                syn_match_msg();
            }
            return;
***************
*** 3935,3953 ****
                                      || curwin->w_s->b_syn_sync_minlines > 0)
      {
        msg_puts("; ");
!       if (curwin->w_s->b_syn_sync_minlines > 0)
        {
!           msg_puts(_("minimal "));
!           msg_outnum(curwin->w_s->b_syn_sync_minlines);
!           if (curwin->w_s->b_syn_sync_maxlines)
!               msg_puts(", ");
!       }
!       if (curwin->w_s->b_syn_sync_maxlines > 0)
!       {
!           msg_puts(_("maximal "));
!           msg_outnum(curwin->w_s->b_syn_sync_maxlines);
        }
-       msg_puts(_(" lines before top line"));
      }
  }
  
--- 3940,3963 ----
                                      || curwin->w_s->b_syn_sync_minlines > 0)
      {
        msg_puts("; ");
!       if (curwin->w_s->b_syn_sync_minlines == MAXLNUM)
!           msg_puts(_("from the first line"));
!       else
        {
!           if (curwin->w_s->b_syn_sync_minlines > 0)
!           {
!               msg_puts(_("minimal "));
!               msg_outnum(curwin->w_s->b_syn_sync_minlines);
!               if (curwin->w_s->b_syn_sync_maxlines)
!                   msg_puts(", ");
!           }
!           if (curwin->w_s->b_syn_sync_maxlines > 0)
!           {
!               msg_puts(_("maximal "));
!               msg_outnum(curwin->w_s->b_syn_sync_maxlines);
!           }
!           msg_puts(_(" lines before top line"));
        }
      }
  }
  
*** ../vim-8.2.2010/src/testdir/test_syntax.vim 2020-09-23 22:38:01.507927503 
+0200
--- src/testdir/test_syntax.vim 2020-11-18 16:52:43.407050852 +0100
***************
*** 316,321 ****
--- 316,323 ----
      syn sync ccomment
    endif
    call assert_notmatch('on C-style comments', execute('syntax sync'))
+   syn sync fromstart
+   call assert_match('syncing starts at the first line', execute('syntax 
sync'))
  
    syn clear
  endfunc
***************
*** 735,740 ****
--- 737,743 ----
    redir END
    call assert_equal("\nsyntax foldlevel start", @c)
    syn sync fromstart
+   call assert_match('from the first line$', execute('syn sync'))
    let a = map(range(3,9), 'foldclosed(v:val)')
    call assert_equal([3,3,3,3,3,3,3], a) " attached cascade folds together
    let a = map(range(10,15), 'foldclosed(v:val)')
*** ../vim-8.2.2010/src/version.c       2020-11-18 16:34:59.266884583 +0100
--- src/version.c       2020-11-18 16:53:03.910974481 +0100
***************
*** 752,753 ****
--- 752,755 ----
  {   /* Add new patch number below this line */
+ /**/
+     2011,
  /**/

-- 
MAN:     You don't frighten us, English pig-dog!  Go and boil your bottoms,
         son of a silly person.  I blow my nose on you, so-called Arthur-king,
         you and your silly English K...kaniggets.
   He puts hands to his ears and blows a raspberry.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202011181553.0AIFrpkt079935%40masaka.moolenaar.net.

Raspunde prin e-mail lui