Re: [code] [textadept] Menu modification delay 2

From: Gabriel Dubatti <gdubatti.att.gmail.com>
Date: Sat, 12 Nov 2016 20:30:05 -0300

Hi Mitchell,

     When I tried this change at home I noticed that all my
modifications in the menus are missing:

     1) adding a new item to the menu bar:

             textadept.menu.menubar[ #textadept.menu.menubar+1 ]= {...}

     2) modifying the edit menu:

             local med=textadept.menu.menubar[_L['_Edit']]
             med[#med+1]= {''}
             med[#med+1]= {'Trim trailing spaces',
Proj.trim_trailing_spaces}

     3) the context menu:

             textadept.menu.context_menu[ #textadept.menu.context_menu+1
]= {...}

     4) and the tab context menu:

             local menu= textadept.menu.tab_context_menu
             insert_menu(menu,2,{'Close Others', Proj.close_others})

     Cheers,

     Gabriel

El 11/11/16 a las 12:04, Mitchell escribió:
> Hi Gabriel,
>
> On Thu, 10 Nov 2016, Gabriel Dubatti wrote:
>
>> Hi Mitchell,
>>
>> Splitting the code in this way:
>>
>> local m1=_L['_File']
>> local m2=_L['_New']
>>
>> ....
>>
>> local m15=_L['Quickly Open _Current Directory']
>> local m16=_L['Quickly Open Current _Project']
>>
>> -------
>>
>> local menu= textadept.menu.menubar[m1]
>> menu[m2][2]= nf
>> menu[m3][2]= of
>> menu[m4][2]= orf
>> menu[m5][2]= cb
>> menu[m6][2]= cab
>> ....
>>
>> I can confirm that all the delay is in menu[] modification.
>
> Thanks for your sleuthing! I've committed a fix[1] that should prevent
> the delays over time. Please test for side effects, as I do not use a
> menubar at all and my regression tests may not have covered everything.
>
> Cheers,
> Mitchell
>
> [1]: http://foicica.com/hg/textadept/rev/fb9057b47510

-- 
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 Sat 12 Nov 2016 - 18:30:05 EST

This archive was generated by hypermail 2.2.0 : Sun 13 Nov 2016 - 06:43:14 EST