Re: [code] Textadept: scripting a symbol auto-highlighter

From: Mitchell <m.att.foicica.com>
Date: Tue, 6 Nov 2018 08:28:41 -0500 (EST)

Hi Phil,

On Tue, 6 Nov 2018, Phil S. wrote:

> I'm scripting another convenience I had gotten used to from VSC as I move to
> Textadept: highlighting all occurrences of current-symbol at caret-pos live
> as the caret moves, without having to Edit / Highlight Word (or
> key-combination).
>
> This can work with this non-breaking new flag added to `editing.lua`s
> `highlight_word` function:
>
> https://gist.github.com/metaleap/7b947f419bfd74896b60a583a6aa173f/revisions?diff=split
>
> Would this be acceptable to merge? Else I'd have to hackily-messily capture
> current-caret-pos before the call and restore it right after, would probably
> cause flickering (and just be senseless & ugly too =)

I've committed a change[1] to just not modify the selection in that function. The name "highlight_word" indicates a visual change, not an editor change like modifying the selection. Thanks for the suggestion.

Cheers,
Mitchell

[1]: https://foicica.com/hg/textadept/rev/bf98f05e6c43

-- 
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 Tue 06 Nov 2018 - 08:28:41 EST

This archive was generated by hypermail 2.2.0 : Wed 07 Nov 2018 - 06:30:09 EST