aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vimrc3
1 files changed, 3 insertions, 0 deletions
diff --git a/vimrc b/vimrc
index 12d3937..3b2b36c 100644
--- a/vimrc
+++ b/vimrc
@@ -392,6 +392,9 @@ call Textobj('/', 'Textobj_regex')
" }}}
" f for folds {{{
function Textobj_fold(inner, count)
+ if foldlevel(line('.')) == 0
+ throw 'no-match'
+ endif
exe 'normal! '.a:count.'[z'
let startline = line('.') + a:inner
normal! ]z