*: Replace b_changedtick with new always-inline functions

Ref #8474
This commit is contained in:
ZyX
2018-06-22 00:44:31 +03:00
parent cf659a1926
commit eaf2a25f12
17 changed files with 93 additions and 60 deletions

View File

@@ -483,9 +483,11 @@ struct file_buffer {
int b_changed; // 'modified': Set to true if something in the
// file has been changed and not written out.
/// Change identifier incremented for each change, including undo
#define b_changedtick changedtick_di.di_tv.vval.v_number
ChangedtickDictItem changedtick_di; // b:changedtick dictionary item.
/// Change identifier incremented for each change, including undo
///
/// This is a dictionary item used to store in b:changedtick.
ChangedtickDictItem changedtick_di;
varnumber_T b_last_changedtick; // b:changedtick when TextChanged or
// TextChangedI was last triggered.
@@ -1195,4 +1197,8 @@ static inline int win_hl_attr(win_T *wp, int hlf)
return wp->w_hl_attrs[hlf];
}
/// Macros defined in Vim, but not in Neovim
#define CHANGEDTICK(buf) \
(=== Include buffer.h & use buf_(get|set|inc)_changedtick ===)
#endif // NVIM_BUFFER_DEFS_H