Files
neovim/runtime
Christian Clason f2894bffb0 lua: Add highlight.on_yank (#12279)
* add lua function to highlight yanked region

* extract namespace, better naming, default values

* add default for event argument

* free timer

* factor out mark to position calculation

* d'oh

* make sure timer stops before callback (cf. luv example)

* factor out timer, more documentation

* fixup

* validate function argument for schedule

* fix block selection past eol

* correct handling of multibyte characters

* move arguments around, some cleanup

* move utility functions to vim.lua

* use anonymous namespaces, avoid local api

* rename function

* add test for schedule_fn

* fix indent

* turn hl-yank into proper (hightlight) module

* factor out position-to-region function

mark extraction now part of highlight.on_yank

* rename schedule_fn to defer_fn

* add test for vim.region

* todo: handle double-width characters

* remove debug printout

* do not shadow arguments

* defer also callable table

* whitespace change

* move highlight to vim/highlight.lua

* add documentation

* add @return documentation

* test: add check before vim.defer fires

* doc: fixup
2020-05-18 09:49:50 -04:00
..
2019-08-02 16:20:23 +02:00
2020-05-18 09:49:50 -04:00
2019-11-28 14:04:40 -08:00
2020-05-18 09:49:50 -04:00
2017-11-07 01:16:42 +01:00
2019-11-24 20:31:46 -05:00
2014-12-19 15:28:49 -05:00
2018-01-15 23:58:52 +01:00
2019-08-02 16:20:22 +02:00
2019-11-27 22:47:25 -08:00
2019-07-29 20:50:07 +02:00
2019-01-04 02:17:23 +01:00
2019-07-29 20:50:07 +02:00
2019-07-29 20:50:07 +02:00
2019-11-24 17:53:33 -08:00
2017-01-31 02:02:09 +01:00
2014-07-29 02:12:31 +00:00