diff options
author | 2013-09-09 21:48:15 -0400 | |
---|---|---|
committer | 2013-09-09 21:48:15 -0400 | |
commit | 7e88330753edcf2df034e2240c2e77e1006d2e64 (patch) | |
tree | 63b7afd8d28129922e7eb5c1f64f7af9dd58813f /modules/textadept/keys.lua | |
parent | 393e320d1f8170ff76fb18fca34b5dbdf36dd31f (diff) | |
download | textadept-7e88330753edcf2df034e2240c2e77e1006d2e64.tar.gz textadept-7e88330753edcf2df034e2240c2e77e1006d2e64.zip |
Moved buffer IO functions into the `io` module.
Menus and key bindings do not need `events.INITIALIZED`.
Diffstat (limited to 'modules/textadept/keys.lua')
-rw-r--r-- | modules/textadept/keys.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/textadept/keys.lua b/modules/textadept/keys.lua index 3acb2a28..f7cb599b 100644 --- a/modules/textadept/keys.lua +++ b/modules/textadept/keys.lua @@ -258,7 +258,7 @@ M.utils = { events.emit(events.UPDATE_UI) -- for updating statusbar end, set_encoding = function(encoding) - buffer:set_encoding(encoding) + io.set_buffer_encoding(encoding) events.emit(events.UPDATE_UI) -- for updating statusbar end, set_eol_mode = function(mode) @@ -363,11 +363,11 @@ for _, f in ipairs(menu_buffer_functions) do buffer[f] = buffer[f] end keys[not OSX and (not CURSES and 'cn' or 'cmn') or 'mn'] = buffer.new keys[not OSX and 'co' or 'mo'] = io.open_file keys[not OSX and not CURSES and 'cao' or 'cmo'] = io.open_recent_file -keys[not OSX and (not CURSES and 'cO' or 'mo') or 'mO'] = buffer.reload -keys[not OSX and 'cs' or 'ms'] = buffer.save -keys[not OSX and (not CURSES and 'cS' or 'cms') or 'mS'] = buffer.save_as -keys[not OSX and 'cw' or 'mw'] = buffer.close -keys[not OSX and (not CURSES and 'cW' or 'cmw') or 'mW'] = io.close_all +keys[not OSX and (not CURSES and 'cO' or 'mo') or 'mO'] = io.reload_file +keys[not OSX and 'cs' or 'ms'] = io.save_file +keys[not OSX and (not CURSES and 'cS' or 'cms') or 'mS'] = io.save_file_as +keys[not OSX and 'cw' or 'mw'] = io.close_buffer +keys[not OSX and (not CURSES and 'cW' or 'cmw') or 'mW'] = io.close_all_buffers -- TODO: textadept.sessions.load -- TODO: textadept.sessions.save keys[not OSX and 'cq' or 'mq'] = quit |