16
16
eq(events, [['py!', vim.current.buffer.number]])
19
@with_setup(setup=cleanup)
21
vim.subscribe('event2')
22
vim.command('call send_event(0, "event1", [1,2,3])')
23
vim.command('call send_event(0, "event2", [4,5,6])')
24
vim.command('call send_event(0, "event2", [7,8,9])')
25
events = vim.expect('event2', 2, lambda e: e[1][0] == 7)
26
eq(events, [['event2', [4, 5, 6]], ['event2', [7, 8, 9]]])
27
vim.unsubscribe('event2')
28
vim.subscribe('event1')
29
vim.command('call send_event(0, "event2", [10,11,12])')
30
vim.command('call send_event(0, "event1", [13,14,15])')
31
eq(vim.next_event(), ['event1', [13, 14, 15]])