summaryrefslogtreecommitdiff
path: root/rplugin/python3/deoplete
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 /rplugin/python3/deoplete
parent90a6a1e3ed9d3213bd81fd07ce4a34dd89ecf9a9 (diff)
downloaddeoplete.nvim-1c6d7d7ed7b4a9f5fffb2583de203df6f6653b44.zip
Remove b:deoplete_file_enable_buffer_path option
Diffstat (limited to 'rplugin/python3/deoplete')
-rw-r--r--rplugin/python3/deoplete/source/file.py10
1 files changed, 5 insertions, 5 deletions
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)