Buffer names seem to be an empty string sometimes and not None

This commit is contained in:
Dave Halter
2017-10-11 09:44:48 +02:00
parent 192e03b335
commit d42f56bc82
2 changed files with 2 additions and 2 deletions

View File

@@ -665,7 +665,7 @@ def new_buffer(path, options='', using_tagstack=False):
vim_command(split_options[user_split_option] + " %s" % escape_file_path(path))
else:
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')
return False
else: