From 3d56741b1ef1ea2790607a5575f771d43aae4308 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Thu, 16 Jun 2011 17:23:55 -0400 Subject: Use functions for generating unique IDs for markers, indicators, and user lists. --- modules/textadept/editing.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'modules/textadept/editing.lua') diff --git a/modules/textadept/editing.lua b/modules/textadept/editing.lua index 629ee017..64dbae76 100644 --- a/modules/textadept/editing.lua +++ b/modules/textadept/editing.lua @@ -22,11 +22,8 @@ module('_m.textadept.editing', package.seeall) -- previous line. -- * `SAVE_STRIPS_WS`: Flag indicating whether or not to strip trailing -- whitespace on file save. --- * `MARK_HIGHLIGHT`: The unique integer mark used to identify a line --- containing a highlighted word. -- * `MARK_HIGHLIGHT_BACK`: The [Scintilla color][scintilla_color] used for a -- line containing a highlighted word. --- * `INDIC_HIGHLIGHT`: The unique integer indicator for highlighted words. -- * `INDIC_HIGHLIGHT_BACK`: The [Scintilla color][scintilla_color] used for an -- indicator for a highlighted word. -- * `INDIC_HIGHLIGHT_ALPHA`: The transparency used for an indicator for a @@ -37,9 +34,7 @@ AUTOPAIR = true HIGHLIGHT_BRACES = true AUTOINDENT = true SAVE_STRIPS_WS = true -MARK_HIGHLIGHT = 2 MARK_HIGHLIGHT_BACK = buffer and buffer.caret_line_back or 0xEEEEEE -INDIC_HIGHLIGHT = 8 -- INDIC_CONTAINER INDIC_HIGHLIGHT_BACK = 0x4080C0 INDIC_HIGHLIGHT_ALPHA = 100 -- end settings @@ -442,6 +437,9 @@ function convert_indentation() buffer:end_undo_action() end +local MARK_HIGHLIGHT = _SCINTILLA.next_marker_number() +local INDIC_HIGHLIGHT = _SCINTILLA.next_indic_number() + -- Clears highlighted word indicators and markers. local function clear_highlighted_words() local buffer = buffer -- cgit v1.2.3