diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-05-29 16:24:50 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-05-29 16:24:50 +0200 |
commit | b127cfd75f59e82580df395b6e2c009774644b16 (patch) | |
tree | 866c78d66b02901c6a13f96db41313d35f00994d /src/channel.c | |
parent | 9f5842e63fc63d438cbffcec503e072a06f74dc2 (diff) |
patch 7.4.1858v7.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.
Diffstat (limited to 'src/channel.c')
-rw-r--r-- | src/channel.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/channel.c b/src/channel.c index 973d234eac..b1f7f1a605 100644 --- a/src/channel.c +++ b/src/channel.c @@ -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); |