Mercurial > vim
diff src/structs.h @ 16636:0daf9eca3541 v8.1.1320
patch 8.1.1320: it is not possible to track changes to a buffer
commit https://github.com/vim/vim/commit/6d2399bd1053b367e13cc2b8991d3ff0bf724c7c
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat May 11 19:14:16 2019 +0200
patch 8.1.1320: it is not possible to track changes to a buffer
Problem: It is not possible to track changes to a buffer.
Solution: Add listener_add() and listener_remove(). No docs or tests yet.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 11 May 2019 19:15:05 +0200 |
parents | 1a911bd57f11 |
children | 978bcd70883d |
line wrap: on
line diff
--- a/src/structs.h +++ b/src/structs.h @@ -1873,6 +1873,19 @@ typedef struct #endif } jobopt_T; +#ifdef FEAT_EVAL +/* + * Structure used for listeners added with listener_add(). + */ +typedef struct listener_S listener_T; +struct listener_S +{ + listener_T *lr_next; + int lr_id; + char_u *lr_callback; + partial_T *lr_partial; +}; +#endif /* structure used for explicit stack while garbage collecting hash tables */ typedef struct ht_stack_S @@ -2424,6 +2437,8 @@ struct file_buffer #ifdef FEAT_EVAL dictitem_T b_bufvar; /* variable for "b:" Dictionary */ dict_T *b_vars; /* internal variables, local to buffer */ + + listener_T *b_listener; #endif #ifdef FEAT_TEXT_PROP int b_has_textprop; // TRUE when text props were added