Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 defe642
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/option.c
Expand Up @@ -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
Expand All @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -789,6 +789,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
107,
/**/
106,
/**/
Expand Down

0 comments on commit defe642

Please sign in to comment.