Permalink
Browse files

patch 8.1.0107: Python: getting buffer option clears message

Problem:    Python: getting buffer option clears message. (Jacob Niehus)
Solution:   Don't use aucmd_prepbuf(). (closes #3079)
  • Loading branch information...
brammool committed Jun 24, 2018
1 parent eee3e94 commit defe6424aee6201241b7cb231b62db4bbb9f4a9f
Showing with 13 additions and 7 deletions.
  1. +11 −7 src/option.c
  2. +2 −0 src/version.c
@@ -9692,7 +9692,7 @@ get_option_value_strict(
* consider it set when 'ff' or 'fenc' changed. */
if (p->indir == PV_MOD)
{
*numval = bufIsChanged((buf_T *) from);
*numval = bufIsChanged((buf_T *)from);
varp = NULL;
}
#ifdef FEAT_CRYPT
@@ -9705,17 +9705,21 @@ get_option_value_strict(
#endif
else
{
aco_save_T aco;
aucmd_prepbuf(&aco, (buf_T *) from);
buf_T *save_curbuf = curbuf;
// only getting a pointer, no need to use aucmd_prepbuf()
curbuf = (buf_T *)from;
curwin->w_buffer = curbuf;
varp = get_varp(p);
aucmd_restbuf(&aco);
curbuf = save_curbuf;
curwin->w_buffer = curbuf;
}
}
else if (opt_type == SREQ_WIN)
{
win_T *save_curwin;
save_curwin = curwin;
curwin = (win_T *) from;
win_T *save_curwin = curwin;
curwin = (win_T *)from;
curbuf = curwin->w_buffer;
varp = get_varp(p);
curwin = save_curwin;
@@ -789,6 +789,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
107,
/**/
106,
/**/

0 comments on commit defe642

Please sign in to comment.