Skip to content

Commit defe642

Browse files
committed
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)
1 parent eee3e94 commit defe642

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

src/option.c

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9692,7 +9692,7 @@ get_option_value_strict(
96929692
* consider it set when 'ff' or 'fenc' changed. */
96939693
if (p->indir == PV_MOD)
96949694
{
9695-
*numval = bufIsChanged((buf_T *) from);
9695+
*numval = bufIsChanged((buf_T *)from);
96969696
varp = NULL;
96979697
}
96989698
#ifdef FEAT_CRYPT
@@ -9705,17 +9705,21 @@ get_option_value_strict(
97059705
#endif
97069706
else
97079707
{
9708-
aco_save_T aco;
9709-
aucmd_prepbuf(&aco, (buf_T *) from);
9708+
buf_T *save_curbuf = curbuf;
9709+
9710+
// only getting a pointer, no need to use aucmd_prepbuf()
9711+
curbuf = (buf_T *)from;
9712+
curwin->w_buffer = curbuf;
97109713
varp = get_varp(p);
9711-
aucmd_restbuf(&aco);
9714+
curbuf = save_curbuf;
9715+
curwin->w_buffer = curbuf;
97129716
}
97139717
}
97149718
else if (opt_type == SREQ_WIN)
97159719
{
9716-
win_T *save_curwin;
9717-
save_curwin = curwin;
9718-
curwin = (win_T *) from;
9720+
win_T *save_curwin = curwin;
9721+
9722+
curwin = (win_T *)from;
97199723
curbuf = curwin->w_buffer;
97209724
varp = get_varp(p);
97219725
curwin = save_curwin;

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -789,6 +789,8 @@ static char *(features[]) =
789789

790790
static int included_patches[] =
791791
{ /* Add new patch number below this line */
792+
/**/
793+
107,
792794
/**/
793795
106,
794796
/**/

0 commit comments

Comments
 (0)