aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/file_io.lua3
-rw-r--r--core/ui.lua3
-rw-r--r--modules/textadept/session.lua2
3 files changed, 5 insertions, 3 deletions
diff --git a/core/file_io.lua b/core/file_io.lua
index f10282dd..46cee08f 100644
--- a/core/file_io.lua
+++ b/core/file_io.lua
@@ -244,7 +244,8 @@ local function close(buffer, force)
title = _L['Close without saving?'],
text = _L['There are unsaved changes in'], informative_text = filename,
icon = 'gtk-dialog-question', button1 = _L['Cancel'],
- button2 = _L['Close without saving']
+ button2 = _L['Close without saving'],
+ width = CURSES and #filename > 40 and ui.size[1] - 2 or nil
}
if button ~= 2 then return nil end -- do not propagate key command
end
diff --git a/core/ui.lua b/core/ui.lua
index e40bf2a9..343b4510 100644
--- a/core/ui.lua
+++ b/core/ui.lua
@@ -434,7 +434,8 @@ events_connect(events.QUIT, function()
text = _L['The following buffers are unsaved:'],
informative_text = table.concat(utf8_list, '\n'),
icon = 'gtk-dialog-question', button1 = _L['Cancel'],
- button2 = _L['Quit without saving']
+ button2 = _L['Quit without saving'],
+ width = CURSES and ui.size[1] - 2 or nil
}
if button ~= 2 then return true end -- prevent quit
end)
diff --git a/modules/textadept/session.lua b/modules/textadept/session.lua
index 15106014..7083c991 100644
--- a/modules/textadept/session.lua
+++ b/modules/textadept/session.lua
@@ -108,7 +108,7 @@ function M.load(filename)
title = _L['Session Files Not Found'],
text = _L['The following session files were not found'],
informative_text = table.concat(not_found, '\n'):iconv('UTF-8', _CHARSET),
- icon = 'gtk-dialog-warning'
+ icon = 'gtk-dialog-warning', width = CURSES and ui.size[1] - 2 or nil
}
end
session_file = filename