Skip to content

Commit 58c457e

Browse files
committed
only neovim has vim.funcs
when checking if we can use sign priority we must make sure to check if vim.funcs exists before using it because its only available in neovim. You don't see this issue poping up if your version of vim is recent enough since it will not contine into the or. Fixes #474 Signed-off-by: BlackEagle <ike.devolder@gmail.com>
1 parent 74b646b commit 58c457e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎python3/vdebug/ui/vimui.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ class SourceWindow(interface.Window):
352352
pointer_sign_id = '6145'
353353
breakpoint_sign_id = '6146'
354354
has_sign_priority = vim.vvars['version'] > 801 \
355-
or vim.funcs.has('nvim-0-4-0')
355+
or (hasattr(vim, 'funcs') and vim.funcs.has('nvim-0-4-0'))
356356

357357
def focus(self):
358358
vim.command("1wincmd w")
@@ -704,7 +704,7 @@ class StackWindow(Window):
704704

705705
pointer_sign_id = '6147'
706706
has_sign_priority = vim.vvars['version'] > 801 \
707-
or vim.funcs.has('nvim-0-4-0')
707+
or (hasattr(vim, 'funcs') and vim.funcs.has('nvim-0-4-0'))
708708

709709
def on_create(self):
710710
self.command('inoremap <buffer> <cr> <esc>'

0 commit comments

Comments
 (0)