diff options
author | 2011-06-16 17:23:55 -0400 | |
---|---|---|
committer | 2011-06-16 17:23:55 -0400 | |
commit | 3d56741b1ef1ea2790607a5575f771d43aae4308 (patch) | |
tree | af4da86dec710546924e7ea7b893591989e785d0 /modules/textadept/snippets.lua | |
parent | 9a61370b7d739b51228395b304915b2c4cc2e077 (diff) | |
download | textadept-3d56741b1ef1ea2790607a5575f771d43aae4308.tar.gz textadept-3d56741b1ef1ea2790607a5575f771d43aae4308.zip |
Use functions for generating unique IDs for markers, indicators, and user lists.
Diffstat (limited to 'modules/textadept/snippets.lua')
-rw-r--r-- | modules/textadept/snippets.lua | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/modules/textadept/snippets.lua b/modules/textadept/snippets.lua index 988424b6..0f4369b3 100644 --- a/modules/textadept/snippets.lua +++ b/modules/textadept/snippets.lua @@ -26,11 +26,6 @@ module('_m.textadept.snippets', package.seeall) -- while `Shift+Tab` tabs backwards through them. Snippets can also be expanded -- inside one another. -- --- ## Settings --- --- * `INDIC_SNIPPET`: The unique integer indicator used to mark the end of a --- snippet. --- -- ## Snippet Precedence -- -- When searching for a snippet to expand in the `snippets` table, snippets in @@ -122,10 +117,6 @@ module('_m.textadept.snippets', package.seeall) -- It is recommended to use tab characters instead of spaces like in the last -- example. Tabs will be converted to spaces as necessary. --- settings -INDIC_SNIPPET = 9 --- end settings - -- The stack of currently running snippets. local snippet_stack = {} @@ -135,6 +126,8 @@ local snippet_stack = {} -- @name newlines local newlines = { [0] = '\r\n', '\r', '\n' } +local INDIC_SNIPPET = _SCINTILLA.next_indic_number() + -- Inserts a new snippet. -- @param text The new snippet to insert. -- @param trigger The trigger text used to expand the snippet, if any. |