diff options
Diffstat (limited to 'modules/textadept')
-rw-r--r-- | modules/textadept/bookmarks.lua | 8 | ||||
-rw-r--r-- | modules/textadept/editing.lua | 10 | ||||
-rw-r--r-- | modules/textadept/keys.lua | 2 | ||||
-rw-r--r-- | modules/textadept/menu.lua | 2 | ||||
-rw-r--r-- | modules/textadept/run.lua | 8 |
5 files changed, 15 insertions, 15 deletions
diff --git a/modules/textadept/bookmarks.lua b/modules/textadept/bookmarks.lua index 3f383a56..d04bb424 100644 --- a/modules/textadept/bookmarks.lua +++ b/modules/textadept/bookmarks.lua @@ -5,11 +5,11 @@ local M = {} --[[ This comment is for LuaDoc. --- -- Bookmarks for Textadept. --- @field MARK_BOOKMARK_COLOR (number) --- The color, in "0xBBGGRR" format, used for a bookmarked line. +-- @field BOOKMARK_COLOR (string) +-- The name of the color in the current theme to mark a bookmarked line with. module('_M.textadept.bookmarks')]] -M.MARK_BOOKMARK_COLOR = not CURSES and 0xB3661A or 0xFF0000 +M.BOOKMARK_COLOR = not CURSES and 'color.dark_blue' or 'color.blue' local MARK_BOOKMARK = _SCINTILLA.next_marker_number() @@ -84,7 +84,7 @@ local CURSES_MARK = _SCINTILLA.constants.SC_MARK_CHARACTER + string.byte(' ') -- Sets view properties for bookmark markers. local function set_bookmark_properties() if CURSES then buffer:marker_define(MARK_BOOKMARK, CURSES_MARK) end - buffer.marker_back[MARK_BOOKMARK] = M.MARK_BOOKMARK_COLOR + buffer.marker_back[MARK_BOOKMARK] = buffer.property_int[M.BOOKMARK_COLOR] end if buffer then set_bookmark_properties() end events.connect(events.VIEW_NEW, set_bookmark_properties) diff --git a/modules/textadept/editing.lua b/modules/textadept/editing.lua index 3fd8cb5b..aefb2eb4 100644 --- a/modules/textadept/editing.lua +++ b/modules/textadept/editing.lua @@ -27,9 +27,9 @@ local M = {} -- @field STRIP_WHITESPACE_ON_SAVE (bool) -- Strip trailing whitespace on file save. -- The default value is `true`. --- @field INDIC_HIGHLIGHT_BACK (number) --- The color, in "0xBBGGRR" format, used for an indicator for the --- [highlighted word](#highlight_word). +-- @field HIGHLIGHT_COLOR (string) +-- The name of the color in the current theme to +-- [highlight words](#highlight_word) with. module('_M.textadept.editing')]] M.AUTOPAIR = true @@ -37,7 +37,7 @@ M.HIGHLIGHT_BRACES = true M.TYPEOVER_CHARS = true M.AUTOINDENT = true M.STRIP_WHITESPACE_ON_SAVE = true -M.INDIC_HIGHLIGHT_BACK = not CURSES and 0x4D99E6 or 0x00FFFF +M.HIGHLIGHT_COLOR = not CURSES and 'color.orange' or 'color.yellow' --- -- Map of lexer names to line comment prefix strings for programming languages, @@ -499,7 +499,7 @@ end -- Sets view properties for highlighted word indicators and markers. local function set_highlight_properties() - buffer.indic_fore[INDIC_HIGHLIGHT] = M.INDIC_HIGHLIGHT_BACK + buffer.indic_fore[INDIC_HIGHLIGHT] = buffer.property_int[M.HIGHLIGHT_COLOR] buffer.indic_style[INDIC_HIGHLIGHT] = _SCINTILLA.constants.INDIC_ROUNDBOX buffer.indic_alpha[INDIC_HIGHLIGHT] = 255 if not CURSES then buffer.indic_under[INDIC_HIGHLIGHT] = true end diff --git a/modules/textadept/keys.lua b/modules/textadept/keys.lua index 2c2f1b43..3470e499 100644 --- a/modules/textadept/keys.lua +++ b/modules/textadept/keys.lua @@ -548,7 +548,7 @@ end keys[not OSX and not CURSES and 'c=' or 'm='] = buffer.zoom_in keys[not OSX and not CURSES and 'c-' or 'm-'] = buffer.zoom_out keys[not OSX and not CURSES and 'c0' or 'm0'] = utils.reset_zoom -if not CURSES then keys[not OSX and 'cT' or 'mT'] = gui.select_theme end +if not CURSES then keys[not OSX and 'cT' or 'mT'] = gui.set_theme end -- Help. if not CURSES then diff --git a/modules/textadept/menu.lua b/modules/textadept/menu.lua index 7f945a9e..3ee4b6ee 100644 --- a/modules/textadept/menu.lua +++ b/modules/textadept/menu.lua @@ -185,7 +185,7 @@ local menubar = { {_L['Zoom _Out'], buffer.zoom_out}, {_L['_Reset Zoom'], utils.reset_zoom}, SEPARATOR, - {_L['Select _Theme...'], gui.select_theme}, + {_L['Select _Theme...'], gui.set_theme}, }, { title = _L['_Help'], {_L['Show _Manual'], diff --git a/modules/textadept/run.lua b/modules/textadept/run.lua index 18577448..512d9ea9 100644 --- a/modules/textadept/run.lua +++ b/modules/textadept/run.lua @@ -10,8 +10,8 @@ local M = {} -- extension. -- -- [language-specific modules]: _M.html#Compile.and.Run --- @field MARK_ERROR_BACK (number) --- The background color, in "0xBBGGRR" format, used for a line containing a +-- @field ERROR_COLOR (string) +-- The name of the color in the current theme to mark a line containing a -- recognized run or compile error. -- @field cwd (string, Read-only) -- The working directory for the most recently executed compile or run @@ -35,7 +35,7 @@ local M = {} -- * `output`: The string output from the command. module('_M.textadept.run')]] -M.MARK_ERROR_BACK = not CURSES and 0x8080CC or 0x0000FF +M.ERROR_COLOR = not CURSES and 'color.light_red' or 'color.red' -- Events. events.COMPILE_OUTPUT, events.RUN_OUTPUT = 'compile_output', 'run_output' @@ -246,7 +246,7 @@ local CURSES_MARK = _SCINTILLA.constants.SC_MARK_CHARACTER + string.byte(' ') -- Sets view properties for error markers. local function set_error_properties() if CURSES then buffer:marker_define(MARK_ERROR, CURSES_MARK) end - buffer.marker_back[MARK_ERROR] = M.MARK_ERROR_BACK + buffer.marker_back[MARK_ERROR] = buffer.property_int[M.ERROR_COLOR] end if buffer then set_error_properties() end events.connect(events.VIEW_NEW, set_error_properties) |