From 00ab4e59a8e812986c17fbc09275cfe0583286dc Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Fri, 16 Nov 2012 15:16:48 +0100 Subject: support EF and EX arguments. FALSE (>= 0) means to refuse closing/exiting if the current file / any file is dirty (modified) -EF and -EX may be used to enforce a close/quit without saving --- qbuffers.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'qbuffers.cpp') diff --git a/qbuffers.cpp b/qbuffers.cpp index 51bf65f..28b54dc 100644 --- a/qbuffers.cpp +++ b/qbuffers.cpp @@ -226,6 +226,18 @@ Ring::find(const gchar *filename) return cur; } +bool +Ring::is_any_dirty(void) +{ + Buffer *cur; + + LIST_FOREACH(cur, &head, buffers) + if (cur->dirty) + return true; + + return false; +} + bool Ring::edit(const gchar *filename) { -- cgit v1.2.3