Re: [code] Line number clipping

From: Robert Gieseke <rob.g.att.web.de>
Date: Mon, 11 Jan 2016 23:02:16 +0100

Hi Philipp,

Am 11/01/16 um 22:28 schrieb Philip R Brenan:
> Is there a way to stop the line numbers being clipped when the buffer is
> zoomed as seen in the attached?

yes, it's this snippet here:

-- adjust line number margin on zoom
events.connect('SCN', function(n)
  if n.code == _SCINTILLA.constants.SCN_ZOOM then
    local buffer = buffer
    local width = #(buffer.line_count..'')
    width = width > 4 and width or 4
    buffer.margin_width_n[0] = 4 + width *
buffer:text_width(_SCINTILLA.constants.STYLE_LINENUMBER, '9')
  end
end)

From:

http://foicica.com/wiki/adjust-line-number-margin-on-zoom

Cheers,
Robert

-- 
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 Mon 11 Jan 2016 - 17:02:16 EST

This archive was generated by hypermail 2.2.0 : Tue 12 Jan 2016 - 06:40:22 EST