aboutsummaryrefslogtreecommitdiff
path: root/core/file_io.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2016-04-05 20:45:51 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2016-04-05 20:45:51 -0400
commit6e086c1310caa4182e919a9ba6fe35f6c3bf3725 (patch)
treec5cef2a2e66bb50c45d67f4a487e5f2a977300c7 /core/file_io.lua
parentc2e9e198fbfa1553411f79ff35b8d972dd417658 (diff)
downloadtextadept-6e086c1310caa4182e919a9ba6fe35f6c3bf3725.tar.gz
textadept-6e086c1310caa4182e919a9ba6fe35f6c3bf3725.zip
Only convert filenames from `_CHARSET` to UTF-8, not UTF-8-encoded buffer names.
Diffstat (limited to 'core/file_io.lua')
-rw-r--r--core/file_io.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/file_io.lua b/core/file_io.lua
index 709bf1c8..9884cdf5 100644
--- a/core/file_io.lua
+++ b/core/file_io.lua
@@ -266,10 +266,10 @@ end
-- @name close_buffer
function io.close_buffer()
local filename = buffer.filename or buffer._type or _L['Untitled']
+ if buffer.filename then filename = filename:iconv('UTF-8', _CHARSET) end
local confirm = not buffer.modify or ui.dialogs.msgbox{
title = _L['Close without saving?'],
- text = _L['There are unsaved changes in'],
- informative_text = filename:iconv('UTF-8', _CHARSET),
+ text = _L['There are unsaved changes in'], informative_text = filename,
icon = 'gtk-dialog-question', button1 = _L['_Cancel'],
button2 = _L['Close _without saving']
} == 2