summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShougo Matsushita <Shougo.Matsu@gmail.com>2016-07-01 08:31:13 +0900
committerShougo Matsushita <Shougo.Matsu@gmail.com>2016-07-01 08:32:43 +0900
commit1c6d7d7ed7b4a9f5fffb2583de203df6f6653b44 (patch)
tree500f89d0fed63f713a21d40459d934235534bbb8
parent90a6a1e3ed9d3213bd81fd07ce4a34dd89ecf9a9 (diff)
downloaddeoplete.nvim-1c6d7d7ed7b4a9f5fffb2583de203df6f6653b44.zip
Remove b:deoplete_file_enable_buffer_path option
-rw-r--r--autoload/deoplete/init.vim2
-rw-r--r--doc/deoplete.txt4
-rw-r--r--rplugin/python3/deoplete/source/file.py10
3 files changed, 5 insertions, 11 deletions
diff --git a/autoload/deoplete/init.vim b/autoload/deoplete/init.vim
index 4636f9c..6768e9c 100644
--- a/autoload/deoplete/init.vim
+++ b/autoload/deoplete/init.vim
@@ -140,8 +140,6 @@ function! deoplete#init#_variables() abort "{{{
\ 'g:deoplete#member#_prefix_patterns', {})
call deoplete#util#set_default(
\ 'g:deoplete#tag#cache_limit_size', 500000)
- call deoplete#util#set_default(
- \ 'g:deoplete#file#enable_buffer_path', 0)
" Initialize default keyword pattern. "{{{
call deoplete#util#set_pattern(
diff --git a/doc/deoplete.txt b/doc/deoplete.txt
index 4bd423f..8407fc5 100644
--- a/doc/deoplete.txt
+++ b/doc/deoplete.txt
@@ -317,10 +317,6 @@ g:deoplete#file#enable_buffer_path
Default value: 0
- *b:deoplete_file_enable_buffer_path*
-b:deoplete_file_enable_buffer_path
- Buffer local variable of |g:deoplete#file#enable_buffer_path|.
-
*g:deoplete#tag#cache_limit_size*
g:deoplete#tag#cache_limit_size
It sets file size to make a cache of a file in
diff --git a/rplugin/python3/deoplete/source/file.py b/rplugin/python3/deoplete/source/file.py
index f6ce640..f74ed8a 100644
--- a/rplugin/python3/deoplete/source/file.py
+++ b/rplugin/python3/deoplete/source/file.py
@@ -23,6 +23,10 @@ class Source(Base):
self.rank = 150
self.__isfname = ''
+ def on_init(self, context):
+ self.__buffer_path = context['vars'].get(
+ 'deoplete#file#enable_buffer_path', 0)
+
def on_event(self, context):
self.__isfname = self.vim.call(
'deoplete#util#vimoption2python_not',
@@ -66,17 +70,13 @@ class Source(Base):
return None
def __substitute_path(self, context, path):
- buffer_path = get_simple_buffer_config(
- context,
- 'deoplete_file_enable_buffer_path',
- 'deoplete#file#enable_buffer_path')
m = re.match(r'(\.+)/', path)
if m:
h = self.vim.funcs.repeat(':h', len(m.group(1)))
return re.sub(r'^\.+',
self.vim.funcs.fnamemodify(
(context['bufname']
- if buffer_path
+ if self.__buffer_path
else context['cwd']), ':p' + h),
path)
m = re.match(r'~/', path)