diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-01-31 20:51:47 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-01-31 20:51:47 +0100 |
commit | a338adcf222b6a24e26ea5ae6a2ad27f914acb38 (patch) | |
tree | 0ffe28d0a3a60c2c1444a991514505c448d4335b /src/macros.h | |
parent | 37badc898b8d167e11553b6d05908ffd35928a6e (diff) | |
download | vim-git-a338adcf222b6a24e26ea5ae6a2ad27f914acb38.tar.gz |
patch 8.0.1449: slow redrawing with DirectXv8.0.1449
Problem: Slow redrawing with DirectX.
Solution: Avoid calling gui_mch_flush() unnecessarily, especially when
updating the cursor. (Ken Takata, closes #2560)
Diffstat (limited to 'src/macros.h')
-rw-r--r-- | src/macros.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/macros.h b/src/macros.h index 1b54b91ba..6e4b813c0 100644 --- a/src/macros.h +++ b/src/macros.h @@ -365,6 +365,17 @@ * HIKEY2DI() converts a hashitem key pointer to a dictitem pointer. * HI2DI() converts a hashitem pointer to a dictitem pointer. */ -# define DI2HIKEY(di) ((di)->di_key) -# define HIKEY2DI(p) ((dictitem_T *)(p - offsetof(dictitem_T, di_key))) -# define HI2DI(hi) HIKEY2DI((hi)->hi_key) +#define DI2HIKEY(di) ((di)->di_key) +#define HIKEY2DI(p) ((dictitem_T *)(p - offsetof(dictitem_T, di_key))) +#define HI2DI(hi) HIKEY2DI((hi)->hi_key) + +/* + * Flush control functions. + */ +#ifdef FEAT_GUI +# define mch_enable_flush() gui_enable_flush() +# define mch_disable_flush() gui_disable_flush() +#else +# define mch_enable_flush() +# define mch_disable_flush() +#endif |