diff options
author | 2009-07-12 12:59:49 -0400 | |
---|---|---|
committer | 2009-07-12 12:59:49 -0400 | |
commit | 16782a2ab5e158f418581b74452415cd561a5046 (patch) | |
tree | ff571846e5db078990f57825313abc1747fa82e7 /core/ext | |
parent | 070f12d6eef343179335d12686c24f8055c2514d (diff) | |
download | textadept-16782a2ab5e158f418581b74452415cd561a5046.tar.gz textadept-16782a2ab5e158f418581b74452415cd561a5046.zip |
Moved session support from core/file_io.lua to a Textadept module.
Diffstat (limited to 'core/ext')
-rw-r--r-- | core/ext/key_commands.lua | 10 | ||||
-rw-r--r-- | core/ext/menu.lua | 4 |
2 files changed, 8 insertions, 6 deletions
diff --git a/core/ext/key_commands.lua b/core/ext/key_commands.lua index 265b5080..370aa1e3 100644 --- a/core/ext/key_commands.lua +++ b/core/ext/key_commands.lua @@ -33,6 +33,7 @@ if not MAC then keys.ct = {} -- Textadept command chain -- File + local m_session = _m.textadept.session keys.cn = { t.new_buffer } keys.co = { t.io.open } -- TODO: { 'reload', b } @@ -40,8 +41,8 @@ if not MAC then keys.css = { 'save_as', b } keys.cw = { 'close', b } keys.csw = { t.io.close_all } - -- TODO: { t.io.load_session } after prompting with open dialog - -- TODO: { t.io.save_session } after prompting with save dialog + -- TODO: { m_session.load } after prompting with open dialog + -- TODO: { m_session.save } after prompting with save dialog keys.aq = { t.quit } -- Edit @@ -214,6 +215,7 @@ else keys.at = {} -- Textadept command chain -- File + local m_session = _m.textadept.session keys.an = { t.new_buffer } keys.ao = { t.io.open } -- TODO: { 'reload', b } @@ -221,8 +223,8 @@ else keys.sas = { 'save_as', b } keys.aw = { 'close', b } keys.saw = { t.io.close_all } - -- TODO: { t.io.load_session } after prompting with open dialog - -- TODO: { t.io.save_session } after prompting with save dialog + -- TODO: { m_session.load } after prompting with open dialog + -- TODO: { m_session.save } after prompting with save dialog keys.aq = { t.quit } -- Edit diff --git a/core/ext/menu.lua b/core/ext/menu.lua index 654f3ba5..c78b36ed 100644 --- a/core/ext/menu.lua +++ b/core/ext/menu.lua @@ -368,7 +368,7 @@ local actions = { ['no-newline'] = true }) if #utf8_filename > 0 then - t.io.load_session(t.iconv(utf8_filename, _CHARSET, 'UTF-8')) + _m.textadept.session.load(t.iconv(utf8_filename, _CHARSET, 'UTF-8')) end end }, @@ -382,7 +382,7 @@ local actions = { ['no-newline'] = true }) if #utf8_filename > 0 then - t.io.save_session(t.iconv(utf8_filename, _CHARSET, 'UTF-8')) + _m.textadept.session.save(t.iconv(utf8_filename, _CHARSET, 'UTF-8')) end end }, |