aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/normal.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-12-13 21:17:57 -0500
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-12-16 19:38:28 -0500
commit63cd5dd0ae3e079e0b69382f905637978a1e2300 (patch)
tree33aca5f499b73c2cde9bd13df0090d86dfe117fe /src/nvim/normal.c
parent251b20e5334e1ff8af7fdd37ca1770ad485f031b (diff)
downloadrneovim-63cd5dd0ae3e079e0b69382f905637978a1e2300.tar.gz
rneovim-63cd5dd0ae3e079e0b69382f905637978a1e2300.tar.bz2
rneovim-63cd5dd0ae3e079e0b69382f905637978a1e2300.zip
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 vim/vim#5354) https://github.com/vim/vim/commit/3b68123cd271fb781da4055cf1a1cf52f4fee6a5
Diffstat (limited to 'src/nvim/normal.c')
-rw-r--r--src/nvim/normal.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c
index b9dbcc6805..9c5434a0dd 100644
--- a/src/nvim/normal.c
+++ b/src/nvim/normal.c
@@ -1553,7 +1553,9 @@ void do_pending_operator(cmdarg_T *cap, int old_col, bool gui_yank)
if (!VIsual_active) {
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 == kMTLineWise)
&& hasFolding(curwin->w_cursor.lnum, NULL,
&curwin->w_cursor.lnum)) {
curwin->w_cursor.col = (colnr_T)STRLEN(get_cursor_line_ptr());