0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

patch 7.4.1858

Problem:    When a channel writes to a buffer it doesn't find a buffer by the
            short name but re-uses it anyway.
Solution:   Find buffer also by the short name.
This commit is contained in:
Bram Moolenaar
2016-05-29 16:24:50 +02:00
parent 9f5842e63f
commit b127cfd75f
4 changed files with 13 additions and 5 deletions

View File

@@ -1079,11 +1079,15 @@ find_buffer(char_u *name, int err)
buf_T *save_curbuf = curbuf;
if (name != NULL && *name != NUL)
{
buf = buflist_findname(name);
if (buf == NULL)
buf = buflist_findname_exp(name);
}
if (buf == NULL)
{
buf = buflist_new(name == NULL || *name == NUL ? NULL : name,
NULL, (linenr_T)0, BLN_LISTED);
NULL, (linenr_T)0, BLN_LISTED | BLN_NEW);
if (buf == NULL)
return NULL;
buf_copy_options(buf, BCO_ENTER);