diff options
author | jluehrs2 <jluehrs2@uiuc.edu> | 2008-04-29 17:00:48 -0500 |
---|---|---|
committer | jluehrs2 <jluehrs2@uiuc.edu> | 2008-04-29 17:00:48 -0500 |
commit | 9082b24b96c233fa2ca58c3d7392bb0953d5c7bd (patch) | |
tree | def46026f0b62ad6d445b994a4edb389b67a3a7a | |
parent | 56bb018794806c023106f858b4358468de31c003 (diff) | |
download | vim-textobj-9082b24b96c233fa2ca58c3d7392bb0953d5c7bd.tar.gz vim-textobj-9082b24b96c233fa2ca58c3d7392bb0953d5c7bd.zip |
make the regex text object do nothing if it can't find matching pairs of /
-rw-r--r-- | vimrc | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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 |