summaryrefslogtreecommitdiff
path: root/autoload/deoplete/handler.vim
diff options
context:
space:
mode:
authorShougo Matsushita <Shougo.Matsu@gmail.com>2020-10-28 17:52:51 +0900
committerShougo Matsushita <Shougo.Matsu@gmail.com>2020-10-28 17:52:51 +0900
commit5c1d0df1704573399fbc35f294386a7998ac40b5 (patch)
treef3502e16674342bb8f951ff2c78fcca568afe42f /autoload/deoplete/handler.vim
parentc09da81e9824fc113323573abea3a2ec13c04409 (diff)
downloaddeoplete.nvim-5c1d0df1704573399fbc35f294386a7998ac40b5.zip
Fix #1143 disable auto indent when &indentexpr is disabled
Diffstat (limited to 'autoload/deoplete/handler.vim')
-rw-r--r--autoload/deoplete/handler.vim5
1 files changed, 5 insertions, 0 deletions
diff --git a/autoload/deoplete/handler.vim b/autoload/deoplete/handler.vim
index 86a0d8e..86fb276 100644
--- a/autoload/deoplete/handler.vim
+++ b/autoload/deoplete/handler.vim
@@ -305,6 +305,11 @@ function! s:check_input_method() abort
return exists('*getimstatus') && getimstatus()
endfunction
function! s:matched_indentkeys(input) abort
+ if &l:indentexpr ==# ''
+ " Disable auto indent
+ return ''
+ endif
+
for word in filter(map(split(&l:indentkeys, ','),
\ "v:val =~# '^<.*>$' ? matchstr(v:val, '^<\\zs.*\\ze>$')
\ : matchstr(v:val, ':\\|e\\|=\\zs.*')"),