Patch 8.1.2059
Problem:    Fix for "x" deleting a fold has side effects.
Solution:   Fix it where the fold is included.
Files:      src/normal.c


*** ../vim-8.1.2058/src/normal.c        2019-09-17 22:42:51.997139914 +0200
--- src/normal.c        2019-09-20 13:14:14.039364017 +0200
***************
*** 1535,1541 ****
            {
                if (hasFolding(oap->start.lnum, &oap->start.lnum, NULL))
                    oap->start.col = 0;
!               if (hasFolding(curwin->w_cursor.lnum, NULL,
                                                      &curwin->w_cursor.lnum))
                    curwin->w_cursor.col = (colnr_T)STRLEN(ml_get_curline());
            }
--- 1535,1542 ----
            {
                if (hasFolding(oap->start.lnum, &oap->start.lnum, NULL))
                    oap->start.col = 0;
!               if ((curwin->w_cursor.col > 0 || oap->inclusive)
!                       && hasFolding(curwin->w_cursor.lnum, NULL,
                                                      &curwin->w_cursor.lnum))
                    curwin->w_cursor.col = (colnr_T)STRLEN(ml_get_curline());
            }
***************
*** 6001,6008 ****
            else
            {
                if (has_mbyte)
!                   curwin->w_cursor.col +=
!                                        (*mb_ptr2len)(ml_get_cursor());
                else
                    ++curwin->w_cursor.col;
            }
--- 6002,6008 ----
            else
            {
                if (has_mbyte)
!                   curwin->w_cursor.col += (*mb_ptr2len)(ml_get_cursor());
                else
                    ++curwin->w_cursor.col;
            }
***************
*** 7400,7412 ****
        {
            if (cap->count0)
                stuffnumReadbuff(cap->count0);
!           // If on an empty line and using 'x' and "l" is included in the
!           // whichwrap option, do not delete the next line.
!           if (cap->cmdchar == 'x' && vim_strchr(p_ww, 'l') != NULL
!                                                     && gchar_cursor() == NUL)
!               stuffReadbuff((char_u *)"dd");
!           else
!               stuffReadbuff(ar[(int)(vim_strchr(str, cap->cmdchar) - str)]);
        }
      }
      cap->opcount = 0;
--- 7400,7406 ----
        {
            if (cap->count0)
                stuffnumReadbuff(cap->count0);
!           stuffReadbuff(ar[(int)(vim_strchr(str, cap->cmdchar) - str)]);
        }
      }
      cap->opcount = 0;
*** ../vim-8.1.2058/src/version.c       2019-09-19 23:21:48.233926270 +0200
--- src/version.c       2019-09-20 13:39:55.792984862 +0200
***************
*** 759,760 ****
--- 759,762 ----
  {   /* Add new patch number below this line */
+ /**/
+     2059,
  /**/

-- 
            ### Hiroshima 45, Chernobyl 86, Windows 95 ###

 /// 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/201909201140.x8KBeu8G010128%40masaka.moolenaar.net.

Raspunde prin e-mail lui