aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2018-12-17 14:06:27 -0500
committermitchell <70453897+667e-11@users.noreply.github.com>2018-12-17 14:06:27 -0500
commit344b6bf59ea1bc5e4ebc27376625a65b8c8463c8 (patch)
tree977920c9b1d8417ed96d15fefd07c1c4651c820d
parent189dfa8250909321a662cffb897d158a09bba090 (diff)
downloadtextadept-344b6bf59ea1bc5e4ebc27376625a65b8c8463c8.tar.gz
textadept-344b6bf59ea1bc5e4ebc27376625a65b8c8463c8.zip
Ensure long filenames are visible in the reload dialog prompt on curses.
-rw-r--r--core/file_io.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/file_io.lua b/core/file_io.lua
index 701b6940..d976d84a 100644
--- a/core/file_io.lua
+++ b/core/file_io.lua
@@ -313,7 +313,8 @@ events_connect(events.FILE_CHANGED, function()
informative_text = string.format('"%s"\n%s',
buffer.filename:iconv('UTF-8', _CHARSET),
_L['has been modified. Reload it?']),
- icon = 'gtk-dialog-question', button1 = _L['_Yes'], button2 = _L['_No']
+ icon = 'gtk-dialog-question', button1 = _L['_Yes'], button2 = _L['_No'],
+ width = CURSES and #buffer.filename > 40 and ui.size[1] - 2 or nil
}
if button == 1 then io.reload_file() end
end)