Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
9148:8aa940057382 | 9149:18bbf31015c2 |
---|---|
1077 { | 1077 { |
1078 buf_T *buf = NULL; | 1078 buf_T *buf = NULL; |
1079 buf_T *save_curbuf = curbuf; | 1079 buf_T *save_curbuf = curbuf; |
1080 | 1080 |
1081 if (name != NULL && *name != NUL) | 1081 if (name != NULL && *name != NUL) |
1082 { | |
1082 buf = buflist_findname(name); | 1083 buf = buflist_findname(name); |
1084 if (buf == NULL) | |
1085 buf = buflist_findname_exp(name); | |
1086 } | |
1083 if (buf == NULL) | 1087 if (buf == NULL) |
1084 { | 1088 { |
1085 buf = buflist_new(name == NULL || *name == NUL ? NULL : name, | 1089 buf = buflist_new(name == NULL || *name == NUL ? NULL : name, |
1086 NULL, (linenr_T)0, BLN_LISTED); | 1090 NULL, (linenr_T)0, BLN_LISTED | BLN_NEW); |
1087 if (buf == NULL) | 1091 if (buf == NULL) |
1088 return NULL; | 1092 return NULL; |
1089 buf_copy_options(buf, BCO_ENTER); | 1093 buf_copy_options(buf, BCO_ENTER); |
1090 curbuf = buf; | 1094 curbuf = buf; |
1091 #ifdef FEAT_QUICKFIX | 1095 #ifdef FEAT_QUICKFIX |