Re: [code] Textadept: replacing a toplevel menubar menu while it is dropped down

From: Mitchell <>
Date: Wed, 7 Nov 2018 09:04:25 -0500 (EST)

Hi Phil,

On Wed, 7 Nov 2018, Phil S. wrote:

> I'm doing something a little funky here, bit of an edge case I guess:
> one of my top-level menus occasionally gets refreshed programmatically with
> new/different items based on certain events.
> When that menu is opened in that very moment, Textadept "sort-of freezes"
> although Scintilla's cursor keeps blinking and the still-showing old menu
> also still reacting to clicks. But you cannot cancel/close it in case you
> DON'T want to pick an item in it. Also no reset or quit possible other than
> via kill sig at this point.
> If there was something like or
> or so to close it, that situation could be
> prevented by my menu-refresher code.
> So that would be a little API feature addition suggestion of mine here ;) as
> a rather slightly lame workaround, I can append a "Close Menu" item at the
> bottom of this dynamic menu for now.
> (I also experimented withprogrammatic menu-cancellation via pretending an ESC
> key-press ala events.emit(events.KEYPRESS, 0xFF1B) but no dice: I guess such
> goes straight to Scintilla, not the outer Xorg / GTK window hosting the
> menu.)

You are venturing into uncharted waters. Textadept was not designed with completely dynamic menus in mind. You'll have to start patching *src/textadept.c* and recompiling to get the behavior you are looking for.


You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Wed 07 Nov 2018 - 09:04:25 EST

This archive was generated by hypermail 2.2.0 : Thu 08 Nov 2018 - 06:49:13 EST