Patch 8.1.2059

17 views
Skip to first unread message

Bram Moolenaar

unread,
Sep 20, 2019, 7:41:03 AM9/20/19
to vim...@googlegroups.com

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 -- Br...@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 ///

Christian Brabandt

unread,
Sep 23, 2019, 10:01:46 AM9/23/19
to vim...@googlegroups.com

On Fr, 20 Sep 2019, Bram Moolenaar wrote:

> 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

Thanks, that seems to work!

Best,
Christian
--
Wenn ein Mann sich für unwiderstehlich hält, liegt es oft daran, daß
er nur dort verkehrt, wo kein Widerstand zu erwarten ist.
-- Françoise Sagan
Reply all
Reply to author
Forward
0 new messages