diff options
author | 2011-05-09 20:16:44 -0400 | |
---|---|---|
committer | 2011-05-09 20:16:44 -0400 | |
commit | d2d6c40a09f846772d540c4665b39e56fc3c9984 (patch) | |
tree | 730db97a0839bcc2d42c08e01efcd4580fda4c85 /modules/textadept | |
parent | 775c84d39f94e603ca81e73d40d993a79513cbca (diff) | |
download | textadept-d2d6c40a09f846772d540c4665b39e56fc3c9984.tar.gz textadept-d2d6c40a09f846772d540c4665b39e56fc3c9984.zip |
Fixed bug in snippets.get_end_position(); modules/textadept/snippets.lua
Diffstat (limited to 'modules/textadept')
-rw-r--r-- | modules/textadept/snippets.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/textadept/snippets.lua b/modules/textadept/snippets.lua index 3fff2de2..988424b6 100644 --- a/modules/textadept/snippets.lua +++ b/modules/textadept/snippets.lua @@ -263,7 +263,9 @@ _snippet_mt = { -- Gets a snippet's end position in the Scintilla buffer. -- @param snippet The snippet returned by new_snippet(). get_end_position = function(snippet) - return buffer:indicator_end(INDIC_SNIPPET, snippet.start_position + 1) + local e = buffer:indicator_end(INDIC_SNIPPET, snippet.start_position + 1) + if e == 0 then e = snippet.start_position end + return e end, -- Gets the text for a snippet. |