diff options
author | 2008-12-16 19:49:30 -0500 | |
---|---|---|
committer | 2008-12-16 19:49:30 -0500 | |
commit | c2d5e0fc3e837e4fac477c1de80396cd60cac237 (patch) | |
tree | c2db4676d7d504be351b580fe78a30017eb39be8 | |
parent | eb3baf70d47b7ea63fd4e144d677bf4ce2655b0d (diff) | |
download | textadept-c2d5e0fc3e837e4fac477c1de80396cd60cac237.tar.gz textadept-c2d5e0fc3e837e4fac477c1de80396cd60cac237.zip |
textadept.io.close_all() returns true or false now; core/file_io.lua
-rw-r--r-- | core/file_io.lua | 4 |
1 files changed, 3 insertions, 1 deletions
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 --- |