aboutsummaryrefslogtreecommitdiff
path: root/core/file_io.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2008-12-16 19:49:30 -0500
committermitchell <70453897+667e-11@users.noreply.github.com>2008-12-16 19:49:30 -0500
commitc2d5e0fc3e837e4fac477c1de80396cd60cac237 (patch)
treec2db4676d7d504be351b580fe78a30017eb39be8 /core/file_io.lua
parenteb3baf70d47b7ea63fd4e144d677bf4ce2655b0d (diff)
downloadtextadept-c2d5e0fc3e837e4fac477c1de80396cd60cac237.tar.gz
textadept-c2d5e0fc3e837e4fac477c1de80396cd60cac237.zip
textadept.io.close_all() returns true or false now; core/file_io.lua
Diffstat (limited to 'core/file_io.lua')
-rw-r--r--core/file_io.lua4
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
---