forked from VimPlug/jedi-vim
Buffer names seem to be an empty string sometimes and not None
This commit is contained in:
@@ -665,7 +665,7 @@ def new_buffer(path, options='', using_tagstack=False):
|
|||||||
vim_command(split_options[user_split_option] + " %s" % escape_file_path(path))
|
vim_command(split_options[user_split_option] + " %s" % escape_file_path(path))
|
||||||
else:
|
else:
|
||||||
if int(vim_eval("!&hidden && &modified")) == 1:
|
if int(vim_eval("!&hidden && &modified")) == 1:
|
||||||
if vim_eval("bufname('%')") is None:
|
if not vim_eval("bufname('%')"):
|
||||||
echo_highlight('Cannot open a new buffer, use `:set hidden` or save your buffer')
|
echo_highlight('Cannot open a new buffer, use `:set hidden` or save your buffer')
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ describe 'goto simple'
|
|||||||
end
|
end
|
||||||
|
|
||||||
it 'goto definitions'
|
it 'goto definitions'
|
||||||
silent normal \d
|
normal \d
|
||||||
Expect line('.') == 1
|
Expect line('.') == 1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user