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

From: Ryan Pusztai <rpusztai.att.gmail.com>
Date: Wed, 9 Nov 2016 09:25:45 -0500

Hi Mitchell,

On Tue, Nov 8, 2016 at 9:44 PM, Mitchell <m.att.foicica.com> 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

```lua
-- Highlight the active buffer/view.

local line_number_back =
  buffer.style_back[_SCINTILLA.constants.STYLE_LINENUMBER]
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)
end

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)
end

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)
  end
end)
```

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

-- 
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 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