aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vimrc6
1 files changed, 6 insertions, 0 deletions
diff --git a/vimrc b/vimrc
index 2b8697a..a18f33f 100644
--- a/vimrc
+++ b/vimrc
@@ -339,6 +339,9 @@ function Textobj_regex(inner, count)
endif
let linenum -= 1
endfor
+ if objstart == -1
+ throw 'no-match'
+ endif
let objstart += a:inner
let objstartline = linenum
@@ -364,6 +367,9 @@ function Textobj_regex(inner, count)
endif
let linenum += 1
endfor
+ if objend == 0
+ throw 'no-match'
+ endif
let objend -= a:inner
let objendline = linenum