aboutsummaryrefslogtreecommitdiff
path: root/core/events.lua
diff options
context:
space:
mode:
Diffstat (limited to 'core/events.lua')
-rw-r--r--core/events.lua14
1 files changed, 2 insertions, 12 deletions
diff --git a/core/events.lua b/core/events.lua
index 302e6fda..0ef56b58 100644
--- a/core/events.lua
+++ b/core/events.lua
@@ -307,7 +307,7 @@ add_handler('uri_dropped',
if WIN32 then utf8_uri = utf8_uri:sub(2, -1) end -- ignore leading '/'
local uri = textadept.iconv(utf8_uri, _CHARSET, 'UTF-8')
if lfs.attributes(uri).mode ~= 'directory' then
- textadept.io.open(utf8_uri)
+ io.open_file(utf8_uri)
end
end
end
@@ -339,17 +339,7 @@ add_handler('margin_click',
buffer:toggle_fold(line)
end)
-add_handler('buffer_new',
- function() -- set additional buffer functions
- local buffer = buffer
- buffer.reload = textadept.io.reload
- buffer.set_encoding = textadept.io.set_encoding
- buffer.save = textadept.io.save
- buffer.save_as = textadept.io.save_as
- buffer.close = textadept.io.close
- buffer.encoding = 'UTF-8'
- set_title(buffer)
- end)
+add_handler('buffer_new', function() set_title(buffer) end)
add_handler('buffer_before_switch',
function() -- save buffer properties