From 33d616b5f2625a6a14a29c5ef780e0a528ebdd86 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Wed, 19 Feb 2020 22:09:25 -0500 Subject: Allow Textadept API completions in special Lua buffers like a Lua REPL. --- modules/lua/init.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules') diff --git a/modules/lua/init.lua b/modules/lua/init.lua index c199e4e8..4c6060f0 100644 --- a/modules/lua/init.lua +++ b/modules/lua/init.lua @@ -13,9 +13,9 @@ module('_M.lua')]] -- Autocompletion and documentation. --- Returns a function that, when called from a Textadept Lua file or the Lua --- command entry, returns the given Textadept tags or API file for use in --- autocompletion and documentation. +-- Returns a function that, when called from a Textadept Lua file, the Lua +-- command entry, or a special Lua buffer (e.g. a REPL), returns the given +-- Textadept tags or API file for use in autocompletion and documentation. -- @param filename Textadept tags or api file to return. local function ta_api(filename) local home = '^'.._HOME:gsub('%p', '%%%0'):gsub('%%[/\\]', '[/\\]') @@ -23,7 +23,7 @@ local function ta_api(filename) return function() local buffer_filename = buffer.filename or '' if buffer_filename:find(home) or buffer_filename:find(userhome) or - buffer == ui.command_entry then + buffer == ui.command_entry or buffer._type then return filename end end -- cgit v1.2.3