aboutsummaryrefslogtreecommitdiff
path: root/core/ext/command_entry.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2010-06-11 18:51:16 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2010-06-11 18:51:16 -0400
commit8e66381a040f695f4203b28bc3f1d6818d0da7a2 (patch)
treee30e8115d27b423b579e60178f36a151dc795f50 /core/ext/command_entry.lua
parent7a4800f05f26067a1cef77e5431256aab4c3d675 (diff)
downloadtextadept-8e66381a040f695f4203b28bc3f1d6818d0da7a2.tar.gz
textadept-8e66381a040f695f4203b28bc3f1d6818d0da7a2.zip
Removed _G.textadept.
Created new _SCINTILLA core module. Renamed textadept.constants to _SCINTILLA.constants Renamed textadept.buffer_functions to _SCINTILLA.functions Renamed textadept.buffer_properties to _SCINTILLA.properties Created new gui core module. Renamed textadept._print() to gui._print(). Renamed textadept.check_focused_buffer() to gui.check_focused_buffer(). Renamed textadept.clipboard_text to gui.clipboard_text. Renamed textadept.context_menu to gui.context_menu Renamed textadept.command_entry to gui.command_entry. Renamed textadept.dialog to gui.dialog. Renamed textadept.docstatusbar_text to gui.docstatusbar_text. Renamed textadept.find to gui.find. Renamed textadept.focused_doc_pointer to gui.focused_doc_pointer. Renamed textadept.get_split_table() to gui.get_split_table(). Renamed textadept.gtkmenu() to gui.gtkmenu(). Renamed textadept.goto_view() to gui.goto_view(). Renamed textadept.menubar to gui.menubar. Renamed textadept.print() to gui.print(). Renamed textadept.size to gui.size. Renamed textadept.statusbar_text to gui.statusbar_text. Renamed textadept.switch_buffer() to gui.switch_buffer(). Renamed textadept.title to gui.title. Renamed textadept.buffers to _G._BUFFERS. Renamed textadept.new_buffer() to _G.new_buffer(). Renamed textadept.quit() to _G.quit(). Renamed textadept.reset() to _G.reset(). Renamed textadept.views to _G._VIEWS. Renamed textadept.user_dofile() to _G.user_dofile(). Renamed textadept.iconv to string.iconv. Renamed textadept.session_file to _SESSIONFILE. Renamed appropriate C functions.
Diffstat (limited to 'core/ext/command_entry.lua')
-rw-r--r--core/ext/command_entry.lua9
1 files changed, 4 insertions, 5 deletions
diff --git a/core/ext/command_entry.lua b/core/ext/command_entry.lua
index c29a2180..296244f4 100644
--- a/core/ext/command_entry.lua
+++ b/core/ext/command_entry.lua
@@ -1,19 +1,18 @@
-- Copyright 2007-2010 Mitchell mitchell<att>caladbolg.net. See LICENSE.
-local textadept = _G.textadept
local locale = _G.locale
events.connect('command_entry_command',
function(command) -- execute a Lua command
local f, err = loadstring(command)
if err then error(err) end
- textadept.command_entry.focus() -- toggle focus to hide
+ gui.command_entry.focus() -- toggle focus to hide
f()
end)
events.connect('command_entry_keypress',
function(code)
- local ce = textadept.command_entry
+ local ce = gui.command_entry
local KEYSYMS = keys.KEYSYMS
if KEYSYMS[code] == 'esc' then
ce.focus() -- toggle focus to hide
@@ -32,11 +31,11 @@ events.connect('command_entry_keypress',
end
if path == 'buffer' then
if o == ':' then
- for f in pairs(textadept.buffer_functions) do
+ for f in pairs(_SCINTILLA.functions) do
if f:find('^'..prefix) then cmpls[#cmpls + 1] = f end
end
else
- for p in pairs(textadept.buffer_properties) do
+ for p in pairs(_SCINTILLA.properties) do
if p:find('^'..prefix) then cmpls[#cmpls + 1] = p end
end
end