From e18b5353cd1931421db376ac4ace4000dfffa86c Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Fri, 14 Apr 2023 16:54:11 +0200 Subject: Fixed leak in Fl_Text_Buffer #716 --- FL/Fl_Text_Buffer.H | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'FL') diff --git a/FL/Fl_Text_Buffer.H b/FL/Fl_Text_Buffer.H index dabe5677a..4a0d0034b 100644 --- a/FL/Fl_Text_Buffer.H +++ b/FL/Fl_Text_Buffer.H @@ -327,13 +327,29 @@ public: */ int undo(int *cp=0); + /** + Check if undo is anabled and if the last action can be undone. + \see canUndo() + */ + bool can_undo(); + /** Redo previous undo action. */ int redo(int *cp=0); /** - Lets the undo system know if we can undo changes + Check if undo is anabled and if the last undo action can be redone. + \see canUndo() + */ + bool can_redo(); + + /** + Enable or disable undo actions for this text buffer. + Undo actions are enable for text buffer by default. If used as a style buffer + in Fl_Text_Display, undo actions are disabled as they are handled by the + text buffer. + \see can_undo() */ void canUndo(char flag=1); -- cgit v1.2.3