forked from aniani/vim
patch 8.2.0002: "dj" only deletes first line of closed fold
Problem: "dj" only deletes first line of closed fold. Solution: Adjust last line of operator for linewise motion. (closes #5354)
This commit is contained in:
@@ -4233,7 +4233,8 @@ do_pending_operator(cmdarg_T *cap, int old_col, int gui_yank)
|
||||
{
|
||||
if (hasFolding(oap->start.lnum, &oap->start.lnum, NULL))
|
||||
oap->start.col = 0;
|
||||
if ((curwin->w_cursor.col > 0 || oap->inclusive)
|
||||
if ((curwin->w_cursor.col > 0 || oap->inclusive
|
||||
|| oap->motion_type == MLINE)
|
||||
&& hasFolding(curwin->w_cursor.lnum, NULL,
|
||||
&curwin->w_cursor.lnum))
|
||||
curwin->w_cursor.col = (colnr_T)STRLEN(ml_get_curline());
|
||||
|
Reference in New Issue
Block a user