diff options
Diffstat (limited to 'modules/textadept')
-rw-r--r-- | modules/textadept/keys.lua | 8 | ||||
-rw-r--r-- | modules/textadept/menu.lua | 18 | ||||
-rw-r--r-- | modules/textadept/run.lua | 2 |
3 files changed, 14 insertions, 14 deletions
diff --git a/modules/textadept/keys.lua b/modules/textadept/keys.lua index 09dbb433..a72899ca 100644 --- a/modules/textadept/keys.lua +++ b/modules/textadept/keys.lua @@ -280,11 +280,11 @@ local keys, OSX, GUI, CURSES, _L = keys, OSX, not CURSES, CURSES, _L keys[not OSX and (GUI and 'cn' or 'cmn') or 'mn'] = buffer.new keys[not OSX and 'co' or 'mo'] = io.open_file keys[not OSX and GUI and 'cao' or 'cmo'] = io.open_recent_file -keys[not OSX and (GUI and 'cO' or 'mo') or 'mO'] = io.reload_file -keys[not OSX and 'cs' or 'ms'] = io.save_file -keys[not OSX and (GUI and 'cS' or 'cms') or 'mS'] = io.save_file_as +keys[not OSX and (GUI and 'cO' or 'mo') or 'mO'] = buffer.reload +keys[not OSX and 'cs' or 'ms'] = buffer.save +keys[not OSX and (GUI and 'cS' or 'cms') or 'mS'] = buffer.save_as -- TODO: io.save_all_files -keys[not OSX and 'cw' or 'mw'] = io.close_buffer +keys[not OSX and 'cw' or 'mw'] = buffer.close keys[not OSX and (GUI and 'cW' or 'cmw') or 'mW'] = io.close_all_buffers -- TODO: textadept.sessions.load -- TODO: textadept.sessions.save diff --git a/modules/textadept/menu.lua b/modules/textadept/menu.lua index 02ae948b..ed1cd763 100644 --- a/modules/textadept/menu.lua +++ b/modules/textadept/menu.lua @@ -15,7 +15,7 @@ module('textadept.menu')]] local _L = _L local SEPARATOR = {''} --- The following buffer functions need to be constantized in order for menu +-- The following buffer functions need to be made constant in order for menu -- items to identify the key associated with the functions. local menu_buffer_functions = { 'undo', 'redo', 'cut', 'copy', 'paste', 'line_duplicate', 'clear', @@ -59,12 +59,12 @@ local default_menubar = { {_L['New'], buffer.new}, {_L['Open'], io.open_file}, {_L['Open Recent...'], io.open_recent_file}, - {_L['Reload'], io.reload_file}, - {_L['Save'], io.save_file}, - {_L['Save As'], io.save_file_as}, + {_L['Reload'], buffer.reload}, + {_L['Save'], buffer.save}, + {_L['Save As'], buffer.save_as}, {_L['Save All'], io.save_all_files}, SEPARATOR, - {_L['Close'], io.close_buffer}, + {_L['Close'], buffer.close}, {_L['Close All'], io.close_all_buffers}, SEPARATOR, {_L['Load Session...'], textadept.session.load}, @@ -381,12 +381,12 @@ local default_context_menu = { -- @class table -- @name tab_context_menu local default_tab_context_menu = { - {_L['Close'], io.close_buffer}, + {_L['Close'], buffer.close}, SEPARATOR, - {_L['Save'], io.save_file}, - {_L['Save As'], io.save_file_as}, + {_L['Save'], buffer.save}, + {_L['Save As'], buffer.save_as}, SEPARATOR, - {_L['Reload'], io.reload_file}, + {_L['Reload'], buffer.reload}, } -- Table of proxy tables for menus. diff --git a/modules/textadept/run.lua b/modules/textadept/run.lua index 3b19c222..91a2e672 100644 --- a/modules/textadept/run.lua +++ b/modules/textadept/run.lua @@ -183,7 +183,7 @@ end local function compile_or_run(filename, commands) if filename == buffer.filename then buffer:annotation_clear_all() - io.save_file() + buffer:save() end local ext = filename:match('[^/\\.]+$') local lexer = filename == buffer.filename and buffer:get_lexer() or |