aboutsummaryrefslogtreecommitdiff
path: root/text-objects.c
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2018-02-28 19:45:26 +0100
committerMarc André Tanner <mat@brain-dump.org>2018-02-28 19:45:26 +0100
commit113a6a6a84198432ed9258f4abd5ec490a64c518 (patch)
treec1f11d636ca00fb5316308fda2bdcf6a0addd27b /text-objects.c
parent26455fe82eab962716123d65fac6ab776992c313 (diff)
downloadvis-113a6a6a84198432ed9258f4abd5ec490a64c518.tar.gz
vis-113a6a6a84198432ed9258f4abd5ec490a64c518.tar.xz
vis: improve handling of linewise ranges in change operator
Diffstat (limited to 'text-objects.c')
-rw-r--r--text-objects.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/text-objects.c b/text-objects.c
index 1f44222..fcd0158 100644
--- a/text-objects.c
+++ b/text-objects.c
@@ -375,7 +375,7 @@ Filerange text_range_linewise(Text *txt, Filerange *rin) {
}
bool text_range_is_linewise(Text *txt, Filerange *r) {
- return text_range_valid(r) &&
+ return text_range_size(r) > 0 &&
r->start == text_line_begin(txt, r->start) &&
r->end == text_line_begin(txt, r->end);
}