Re: [code][textadept] SCN_ZOOM

From: Peter Rolf <indiego.att.gmx.net>
Date: Tue, 28 Nov 2017 16:24:21 +0100

Works like a charm :D

Mitchell, could you add the 'SCN_ZOOM' event to 'scnotifications'?

Am 28.11.2017 um 15:05 schrieb Peter Rolf:
> Jens, thanks for the pointer :D
>
> I will test it out and report back.
>
> Am 28.11.2017 um 07:47 schrieb Jens Remus:
>> Peter Rolf <indiego.att.gmx.net <mailto:indiego.att.gmx.net>> schrieb am So. 26.
>> Nov. 2017 um 13:42:
>>
>> is there a way to hook into SCN_ZOOM events? The only things I found
>> regarding 'zoom' is 'buffer.zoom_in|out' and 'buffer.zoom'.
>>
>>
>> Based on the example in the Textadept Wiki:
>> https://foicica.com/wiki/adjust-line-number-margin-on-zoom
>>
>> events.connect('SCN', function(n)
>>   if n.code == _SCINTILLA.constants.SCN_ZOOM then
>>     ui.statusbar_text = 'Zoom set to ' .. buffer.zoom
>>   end
>> end)
>>
>>
>> If Mitchell would add it to the scnotifications table in core/events.lua
>> as follows it could also be made available as indepenent event:
>>
>> local scnotifications = {
>>   ...
>>   [c.SCN_ZOOM] = {'zoom'},
>> }
>>
>> This would then enable to use it as follows:
>>
>> events.connect(events.ZOOM, function()
>>   ui.statusbar_text = 'Zoom set to ' .. buffer.zoom
>> end)
>>
>> Regards,
>> Jens
>

-- 
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 28 Nov 2017 - 10:24:21 EST

This archive was generated by hypermail 2.2.0 : Wed 29 Nov 2017 - 06:36:36 EST