[code] Textadept: non-breaking patch suggestion for editing.lua (to make custom scripting of mouse-driven hover-tips possible)

From: Phil S. <accountz.att.mailbox.org>
Date: Sun, 4 Nov 2018 20:57:34 +0100

> *core/ui.lua* around lines 335 and 350 has buffer state save/restore.
> There's no single state object. Just some simple arbitrarily
> "_"-prefixed properties.

Cool, will look into that! While I have your attention, remember my
earlier exploration into the "mouse-driven hover-tips" script?

It seems to now have settled that for this to work my local
`textadept/modules/textadept/editing.lua` needs to be patched up as
shown in the top-most diff here:

https://gist.github.com/metaleap/c564a62398ef0ef2dc5a4b36739fb3c9/revisions?diff=split

I can of course keep patching my own local editing.lua on every TA
update, but this seems a totally benign non-breaking tweak AFAICT. Would
you consider looking at it, determining whether there are any hidden /
unnoticed-by-me potential implied issues / gotchas / pitfalls that could
arise from it, and if not would this tweak be acceptable for you to
merge into Textadept's "official" editing.lua?

(NB at first I had `calltip_pos` be a {} table mapping from
`buffer.filename`s to call-tip positions, but now instead this singular
numeric local seems just sufficient given that (the code flow) it is
always being written to before being read from -- since any
currently-showing call-tip never survives a buffer-switch and shouldn't.)

One thing looks certain at my end, all existing call-tip functionality
(eg. via ctrl+H and call-tip clickings and repeat ctrl+H presses) seems
to continue working as it used to. (It's a pretty simplistic, semantics-
and interface-preserving alteration after all. =)

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Sun 04 Nov 2018 - 14:57:34 EST

This archive was generated by hypermail 2.2.0 : Mon 05 Nov 2018 - 06:47:14 EST