summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--autoload/deoplete/init.vim7
-rw-r--r--doc/deoplete.txt2
-rw-r--r--rplugin/python3/deoplete/sources/base.py3
3 files changed, 6 insertions, 6 deletions
diff --git a/autoload/deoplete/init.vim b/autoload/deoplete/init.vim
index 9aaf5a9..801e1f4 100644
--- a/autoload/deoplete/init.vim
+++ b/autoload/deoplete/init.vim
@@ -89,6 +89,8 @@ function! deoplete#init#_variables() abort "{{{
call deoplete#util#set_default(
\ 'g:deoplete#enable_at_startup', 0)
call deoplete#util#set_default(
+ \ 'g:deoplete#auto_complete_start_length', 2)
+ call deoplete#util#set_default(
\ 'g:deoplete#enable_ignore_case', &ignorecase)
call deoplete#util#set_default(
\ 'g:deoplete#enable_smart_case', &smartcase)
@@ -186,11 +188,6 @@ function! deoplete#init#_variables() abort "{{{
\ g:deoplete#member#_prefix_patterns,
\ 'lua', ['\.', ':'])
"}}}
-
- if exists('g:deoplete#auto_complete_start_length')
- call deoplete#custom#set('_', 'min_pattern_length',
- \ g:deoplete#auto_complete_start_length)
- endif
endfunction"}}}
function! deoplete#init#_context(event, sources) abort "{{{
diff --git a/doc/deoplete.txt b/doc/deoplete.txt
index 84f486c..2a9caa3 100644
--- a/doc/deoplete.txt
+++ b/doc/deoplete.txt
@@ -119,6 +119,8 @@ g:deoplete#auto_complete_start_length
Note: It is the deprecated option. You should change
|deoplete-source-attribute-min_pattern_length|.
+ Default: 2
+
*g:deoplete#disable_auto_complete*
g:deoplete#disable_auto_complete
It controls whether you invalidate automatic completion. If
diff --git a/rplugin/python3/deoplete/sources/base.py b/rplugin/python3/deoplete/sources/base.py
index 95024ef..f54da61 100644
--- a/rplugin/python3/deoplete/sources/base.py
+++ b/rplugin/python3/deoplete/sources/base.py
@@ -16,7 +16,8 @@ class Base(LoggingMixin):
self.name = 'base'
self.description = ''
self.mark = ''
- self.min_pattern_length = 2
+ self.min_pattern_length = self.vim.vars[
+ 'deoplete#auto_complete_start_length']
self.max_pattern_length = 80
self.max_abbr_width = self.vim.vars['deoplete#max_abbr_width']
self.max_menu_width = self.vim.vars['deoplete#max_menu_width']