Patch 8.2.5070
Problem:    Unnecessary code.
Solution:   Remove code that isn't needed. (closes #10534)
Files:      src/message.c, src/screen.c


*** ../vim-8.2.5069/src/message.c       2022-06-07 10:16:09.453398794 +0100
--- src/message.c       2022-06-09 13:52:08.263039079 +0100
***************
*** 1997,2007 ****
                        && curwin->w_lcs_chars.leadmultispace != NULL)
                {
                    c = curwin->w_lcs_chars.leadmultispace[multispace_pos++];
!                   if (curwin->w_lcs_chars.leadmultispace[multispace_pos] == 
NUL)
                        multispace_pos = 0;
                    attr = HL_ATTR(HLF_8);
                }
!               else if (lead != NULL && s <= lead && curwin->w_lcs_chars.lead)
                {
                    c = curwin->w_lcs_chars.lead;
                    attr = HL_ATTR(HLF_8);
--- 1997,2009 ----
                        && curwin->w_lcs_chars.leadmultispace != NULL)
                {
                    c = curwin->w_lcs_chars.leadmultispace[multispace_pos++];
!                   if (curwin->w_lcs_chars.leadmultispace[multispace_pos]
!                                                                       == NUL)
                        multispace_pos = 0;
                    attr = HL_ATTR(HLF_8);
                }
!               else if (lead != NULL && s <= lead
!                                           && curwin->w_lcs_chars.lead != NUL)
                {
                    c = curwin->w_lcs_chars.lead;
                    attr = HL_ATTR(HLF_8);
***************
*** 2011,2024 ****
                    c = curwin->w_lcs_chars.trail;
                    attr = HL_ATTR(HLF_8);
                }
-               else if (list && lead != NULL && s <= lead && in_multispace
-                       && curwin->w_lcs_chars.leadmultispace != NULL)
-               {
-                   c = curwin->w_lcs_chars.leadmultispace[multispace_pos++];
-                   if (curwin->w_lcs_chars.leadmultispace[multispace_pos] == 
NUL)
-                       multispace_pos = 0;
-                   attr = HL_ATTR(HLF_8);
-               }
                else if (list && in_multispace
                        && curwin->w_lcs_chars.multispace != NULL)
                {
--- 2013,2018 ----
*** ../vim-8.2.5069/src/screen.c        2022-06-07 10:16:09.453398794 +0100
--- src/screen.c        2022-06-09 13:54:14.403030741 +0100
***************
*** 4904,4909 ****
--- 4904,4910 ----
            {
                lcs_chars.tab1 = NUL;
                lcs_chars.tab3 = NUL;
+ 
                if (multispace_len > 0)
                {
                    lcs_chars.multispace = ALLOC_MULT(int, multispace_len + 1);
***************
*** 5028,5034 ****
                    s = p + len2 + 1;
                    if (round == 0)
                    {
!                       // Get length of lcsmultispace string in first round
                        last_lmultispace = p;
                        lead_multispace_len = 0;
                        while (*s != NUL && *s != ',')
--- 5029,5036 ----
                    s = p + len2 + 1;
                    if (round == 0)
                    {
!                       // get length of lcs-leadmultispace string in first
!                       // round
                        last_lmultispace = p;
                        lead_multispace_len = 0;
                        while (*s != NUL && *s != ',')
***************
*** 5039,5045 ****
                            ++lead_multispace_len;
                        }
                        if (lead_multispace_len == 0)
!                           // lcsmultispace cannot be an empty string
                            return e_invalid_argument;
                        p = s;
                    }
--- 5041,5047 ----
                            ++lead_multispace_len;
                        }
                        if (lead_multispace_len == 0)
!                           // lcs-leadmultispace cannot be an empty string
                            return e_invalid_argument;
                        p = s;
                    }
***************
*** 5066,5075 ****
      }
      if (tab == lcstab)
      {
!       if (wp->w_lcs_chars.multispace != NULL)
!           vim_free(wp->w_lcs_chars.multispace);
!       if (wp->w_lcs_chars.leadmultispace != NULL)
!           vim_free(wp->w_lcs_chars.leadmultispace);
        wp->w_lcs_chars = lcs_chars;
      }
  
--- 5068,5075 ----
      }
      if (tab == lcstab)
      {
!       vim_free(wp->w_lcs_chars.multispace);
!       vim_free(wp->w_lcs_chars.leadmultispace);
        wp->w_lcs_chars = lcs_chars;
      }
  
*** ../vim-8.2.5069/src/version.c       2022-06-08 15:13:42.884129614 +0100
--- src/version.c       2022-06-09 13:51:16.683042305 +0100
***************
*** 736,737 ****
--- 736,739 ----
  {   /* Add new patch number below this line */
+ /**/
+     5070,
  /**/

-- 
An indication you must be a manager:
You believe you never have any problems in your life, just
"issues" and "improvement opportunities".

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            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/20220609130557.DE77F1C291C%40moolenaar.net.

Raspunde prin e-mail lui