NagView improvements (#136)

Implement keyboard commands for the NagView.
This commit is contained in:
Takase
2021-04-04 16:11:47 +02:00
committed by GitHub
parent 49cde08ed6
commit 63b9cf223e
3 changed files with 142 additions and 73 deletions
+2 -2
View File
@@ -481,8 +481,8 @@ function core.confirm_close_all(close_fn, ...)
end
local args = {...}
local opt = {
{ font = style.font, text = "Yes" },
{ font = style.font, text = "No" }
{ font = style.font, text = "Yes", default_yes = true },
{ font = style.font, text = "No" , default_no = true }
}
core.nag_view:show("Unsaved Changes", text, opt, function(item)
if item.text == "Yes" then close_fn(table.unpack(args)) end