comparison src/channel.c @ 8657:c70eea7a7677 v7.4.1618

commit https://github.com/vim/vim/commit/a4f6ca717b4483eb82c6c71f71a5a5cf70e55d80 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Mar 20 17:28:35 2016 +0100 patch 7.4.1618 Problem: Starting job with output to buffer changes options in the current buffer. Solution: Set "curbuf" earlier. (Yasuhiro Matsumoto)
author Christian Brabandt <cb@256bit.org>
date Sun, 20 Mar 2016 17:30:05 +0100
parents 1eb302bf2475
children 8c80c21a1885
comparison
equal deleted inserted replaced
8656:4eb958e92436 8657:c70eea7a7677
1001 if (buf == NULL) 1001 if (buf == NULL)
1002 { 1002 {
1003 buf = buflist_new(name == NULL || *name == NUL ? NULL : name, 1003 buf = buflist_new(name == NULL || *name == NUL ? NULL : name,
1004 NULL, (linenr_T)0, BLN_LISTED); 1004 NULL, (linenr_T)0, BLN_LISTED);
1005 buf_copy_options(buf, BCO_ENTER); 1005 buf_copy_options(buf, BCO_ENTER);
1006 curbuf = buf;
1006 #ifdef FEAT_QUICKFIX 1007 #ifdef FEAT_QUICKFIX
1007 set_option_value((char_u *)"bt", 0L, (char_u *)"nofile", OPT_LOCAL); 1008 set_option_value((char_u *)"bt", 0L, (char_u *)"nofile", OPT_LOCAL);
1008 set_option_value((char_u *)"bh", 0L, (char_u *)"hide", OPT_LOCAL); 1009 set_option_value((char_u *)"bh", 0L, (char_u *)"hide", OPT_LOCAL);
1009 #endif 1010 #endif
1010 curbuf = buf;
1011 if (curbuf->b_ml.ml_mfp == NULL) 1011 if (curbuf->b_ml.ml_mfp == NULL)
1012 ml_open(curbuf); 1012 ml_open(curbuf);
1013 ml_replace(1, (char_u *)(err ? "Reading from channel error..." 1013 ml_replace(1, (char_u *)(err ? "Reading from channel error..."
1014 : "Reading from channel output..."), TRUE); 1014 : "Reading from channel output..."), TRUE);
1015 changed_bytes(1, 0); 1015 changed_bytes(1, 0);