From c2d5e0fc3e837e4fac477c1de80396cd60cac237 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Tue, 16 Dec 2008 19:49:30 -0500 Subject: textadept.io.close_all() returns true or false now; core/file_io.lua --- core/file_io.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'core/file_io.lua') diff --git a/core/file_io.lua b/core/file_io.lua index b87356f1..8ce76306 100644 --- a/core/file_io.lua +++ b/core/file_io.lua @@ -154,12 +154,14 @@ end -- If any buffer is dirty, the user is prompted to continue. No buffers are -- saved automatically. They must be saved manually. -- @usage textadept.io.close_all() +-- @return true if user did not cancel. function close_all() while #textadept.buffers > 1 do view:goto_buffer(#textadept.buffers) - if not buffer:close() then return end + if not buffer:close() then return false end end buffer:close() -- the last one + return true end --- -- cgit v1.2.3