Re: [code] [textadept] New Export Module on the Wiki

From: Ryan Pusztai <>
Date: Wed, 9 Nov 2016 09:25:45 -0500

Hi Mitchell,

On Tue, Nov 8, 2016 at 9:44 PM, Mitchell <> wrote
> No it is not expected. What theme are you using? It looks like you have a
> theme that has a style with "fore:..." where the "..." evaluates to
> something that is not a number. Perhaps there's a nested "%(...)" that is
> not being recursively evaluated. Any additional info would be helpful. I've
> only tested this module with default themes and base16 themes.

I am just using "dark" which is a default one.

I also use a module to highlight the current buffer/view

-- Highlight the active buffer/view.

local line_number_back =
local current_line_back = buffer.caret_line_back

local function active()
  local buffer = buffer
  buffer.style_back[33] = current_line_back
  buffer:set_fold_margin_colour(1, current_line_back)
  buffer:set_fold_margin_hi_colour(1, current_line_back)

local function inactive()
  local buffer = buffer
  buffer.style_back[33] = line_number_back
  buffer:set_fold_margin_colour(true, line_number_back)
  buffer:set_fold_margin_hi_colour(true, line_number_back)

events.connect(events.VIEW_BEFORE_SWITCH, function() inactive() end)
events.connect(events.VIEW_AFTER_SWITCH, function() active() end)
events.connect(events.BUFFER_AFTER_SWITCH, function() active() end)
events.connect(events.BUFFER_NEW, function() active() end)
events.connect(events.FILE_OPENED, function() active() end)
events.connect(events.RESET_AFTER, function() active() end)

events.connect(events.BUFFER_AFTER_SWITCH, function()
  local buffer = buffer
  if buffer._textredux then
    buffer.style_fore[33] = current_line_back
    buffer:set_fold_margin_colour(1, line_number_back)
    buffer:set_fold_margin_hi_colour(1, line_number_back)

I think that is the only theme things I do. Let me know if you have any
other questions.

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

This archive was generated by hypermail 2.2.0 : Thu 10 Nov 2016 - 06:53:09 EST