Skip to content

Commit

Permalink
🐛 fix broken search function
Browse files Browse the repository at this point in the history
  • Loading branch information
ezpuzz committed Oct 13, 2018
1 parent 9b9ffe8 commit f052079
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ftplugin/yaml.vim
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
" Maintainer: Einenlum
" URL: https://github.com/Einenlum/yaml-revealer

function! GetIndentationStep()
call cursor(1,1)
call search('^\s')
return indent(".")
endfunction

function! KeyNotFound(keyName)
echo "\n\"".a:keyName."\" not found."
echo "\nThe correct syntax is: firstVar>secondVar>thirdVar"
Expand Down Expand Up @@ -57,6 +63,7 @@ function! GetAncestors(line, indent)
if(getline(a:line) !~ '^\s*$') " not an empty line
return ''
else
" sometimes there are newlines within a multiline key
return GetAncestors(a:line-1, a:indent) " return ancestors of previous line
endif
endif
Expand Down

0 comments on commit f052079

Please sign in to comment.