From 115884fd617114be76ccddd2389b815a3a0c6100 Mon Sep 17 00:00:00 2001 From: Miles Canfield Date: Tue, 20 Oct 2020 17:17:30 -0600 Subject: [PATCH] Limit to lines within range for inner text objects --- vis.c | 3 +++ 1 file changed, 3 insertions(+) --- a/vis.c +++ b/vis.c @@ -963,6 +963,9 @@ void vis_do(Vis *vis) { if (a->textobj->type & TEXTOBJECT_DELIMITED_OUTER) { r.start--; r.end++; + } else if (linewise && (a->textobj->type & TEXTOBJECT_DELIMITED_INNER)) { + r.start = text_line_next(txt, r.start); + r.end = text_line_prev(txt, r.end); } if (vis->mode->visual || (i > 0 && !(a->textobj->type & TEXTOBJECT_NON_CONTIGUOUS)))