1
0
forked from aniani/vim

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.
This commit is contained in:
Bram Moolenaar
2019-05-11 19:14:16 +02:00
parent 6ed8819822
commit 6d2399bd10
4 changed files with 151 additions and 0 deletions

View File

@@ -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