Skip to content

Commit b8aef1b

Browse files
committed
Neovim has added the state() function; use it if available
See: neovim/neovim#23576 Unintentional multiline string indentation will no longer occur in future Neovim versions.
1 parent 5550111 commit b8aef1b

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

indent/clojure.vim

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -181,13 +181,9 @@ endfunction
181181

182182
" Returns "1" when the "=" operator is currently active.
183183
function! s:EqualsOperatorInEffect()
184-
if has('nvim')
185-
" Neovim has no `state()` function so fallback to indenting
186-
" strings.
187-
return 0
188-
else
189-
return v:operator ==# '=' && state('o') ==# 'o'
190-
endif
184+
return exists('*state')
185+
\ ? v:operator ==# '=' && state('o') ==# 'o'
186+
\ : 0
191187
endfunction
192188

193189
function! s:StringIndent(delim_pos)

0 commit comments

Comments
 (0)