From cfa2107e33e98c35a2f08236ef6816fbae7cc8f1 Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Sun, 22 Nov 2015 02:29:14 +0100 Subject: vim-patch:7.4.655 Problem: Text deleted by "dit" depends on indent of closing tag. (Jan Parthey) Solution: Do not adjust oap->end in do_pending_operator(). (Christian Brabandt) https://github.com/vim/vim/commit/b6c2735c56f1541159e1ad95c3f17a52b3a94f1d --- src/nvim/normal.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/nvim/normal.c') diff --git a/src/nvim/normal.c b/src/nvim/normal.c index 78df4ea7ea..1f0fe287bf 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -7474,6 +7474,13 @@ static void nv_object(cmdarg_T *cap) flag = current_block(cap->oap, cap->count1, include, '<', '>'); break; case 't': /* "at" = a tag block (xml and html) */ + // Do not adjust oap->end in do_pending_operator() + // otherwise there are different results for 'dit' + // (note leading whitespace in last line): + // 1) 2) + // foobar foobar + // + cap->retval |= CA_NO_ADJ_OP_END; flag = current_tagblock(cap->oap, cap->count1, include); break; case 'p': /* "ap" = a paragraph */ -- cgit