From f2374c4aba53fa462dc88d4104e10d8cb97e61ba Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Mon, 25 May 2020 21:16:01 -0400 Subject: Allow views to be used as buffers and update API. This allows for a superficial separation of buffer- and view-specific Scintilla functionality. buffers and views can now be used interchangeably for the most part, and the APIs are guidance, not hard requirements. User scripts do not require any modification and will continue to function normally. --- modules/textadept/snippets.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/textadept/snippets.lua') diff --git a/modules/textadept/snippets.lua b/modules/textadept/snippets.lua index 707ab7ca..73f46bde 100644 --- a/modules/textadept/snippets.lua +++ b/modules/textadept/snippets.lua @@ -653,8 +653,8 @@ events.connect(events.UPDATE_UI, function(updated) end) events.connect(events.VIEW_NEW, function() - buffer.indic_style[INDIC_SNIPPET] = buffer.INDIC_HIDDEN - buffer.indic_style[INDIC_CURRENTPLACEHOLDER] = buffer.INDIC_HIDDEN + view.indic_style[INDIC_SNIPPET] = view.INDIC_HIDDEN + view.indic_style[INDIC_CURRENTPLACEHOLDER] = view.INDIC_HIDDEN end) -- Returns for the word behind the caret a list of snippet trigger word -- cgit v1.2.3