Re: [code][textadept] SCN_ZOOM

From: Jens Remus <jens.remus.att.gmail.com>
Date: Tue, 28 Nov 2017 06:47:51 +0000

Peter Rolf <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 - 01:47:51 EST

This archive was generated by hypermail 2.2.0 : Tue 28 Nov 2017 - 06:36:44 EST