mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 11:15:14 -07:00
vim-patch:8.0.1394: cannot intercept a yank command
Problem: Cannot intercept a yank command.
Solution: Add the TextYankPost autocommand event. (Philippe Vaucher et al.,
closes vim/vim#2333)
7e1652c63c
This commit is contained in:
parent
c9195a1273
commit
cc798c626a
@ -377,11 +377,9 @@ void eval_init(void)
|
|||||||
msgpack_types_dict->dv_lock = VAR_FIXED;
|
msgpack_types_dict->dv_lock = VAR_FIXED;
|
||||||
|
|
||||||
set_vim_var_dict(VV_MSGPACK_TYPES, msgpack_types_dict);
|
set_vim_var_dict(VV_MSGPACK_TYPES, msgpack_types_dict);
|
||||||
set_vim_var_dict(VV_COMPLETED_ITEM, tv_dict_alloc());
|
set_vim_var_dict(VV_COMPLETED_ITEM, tv_dict_alloc_lock(VAR_FIXED));
|
||||||
|
|
||||||
dict_T *v_event = tv_dict_alloc();
|
set_vim_var_dict(VV_EVENT, tv_dict_alloc_lock(VAR_FIXED));
|
||||||
v_event->dv_lock = VAR_FIXED;
|
|
||||||
set_vim_var_dict(VV_EVENT, v_event);
|
|
||||||
set_vim_var_list(VV_ERRORS, tv_list_alloc(kListLenUnknown));
|
set_vim_var_list(VV_ERRORS, tv_list_alloc(kListLenUnknown));
|
||||||
set_vim_var_nr(VV_STDERR, CHAN_STDERR);
|
set_vim_var_nr(VV_STDERR, CHAN_STDERR);
|
||||||
set_vim_var_nr(VV_SEARCHFORWARD, 1L);
|
set_vim_var_nr(VV_SEARCHFORWARD, 1L);
|
||||||
|
@ -2106,6 +2106,13 @@ list_T *tv_list_alloc_ret(typval_T *const ret_tv, const ptrdiff_t len)
|
|||||||
return l;
|
return l;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dict_T *tv_dict_alloc_lock(VarLockStatus lock)
|
||||||
|
{
|
||||||
|
dict_T *const d = tv_dict_alloc();
|
||||||
|
d->dv_lock = lock;
|
||||||
|
return d;
|
||||||
|
}
|
||||||
|
|
||||||
/// Allocate an empty dictionary for a return value
|
/// Allocate an empty dictionary for a return value
|
||||||
///
|
///
|
||||||
/// Also sets reference count.
|
/// Also sets reference count.
|
||||||
@ -2114,9 +2121,8 @@ list_T *tv_list_alloc_ret(typval_T *const ret_tv, const ptrdiff_t len)
|
|||||||
void tv_dict_alloc_ret(typval_T *const ret_tv)
|
void tv_dict_alloc_ret(typval_T *const ret_tv)
|
||||||
FUNC_ATTR_NONNULL_ALL
|
FUNC_ATTR_NONNULL_ALL
|
||||||
{
|
{
|
||||||
dict_T *const d = tv_dict_alloc();
|
dict_T *const d = tv_dict_alloc_lock(VAR_UNLOCKED);
|
||||||
tv_dict_set_ret(ret_tv, d);
|
tv_dict_set_ret(ret_tv, d);
|
||||||
ret_tv->v_lock = VAR_UNLOCKED;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//{{{3 Clear
|
//{{{3 Clear
|
||||||
|
Loading…
Reference in New Issue
Block a user