Mercurial > vim
diff src/channel.c @ 9149:18bbf31015c2 v7.4.1858
commit https://github.com/vim/vim/commit/b127cfd75f59e82580df395b6e2c009774644b16
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun May 29 16:24:50 2016 +0200
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.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 29 May 2016 16:30:07 +0200 |
parents | 053bc64433ec |
children | d0f69d0bea7a |
line wrap: on
line diff
--- 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);