summaryrefslogtreecommitdiff
path: root/FL/Fl_Text_Buffer.H
diff options
context:
space:
mode:
authorMatthias Melcher <github@matthiasm.com>2023-04-14 16:54:11 +0200
committerMatthias Melcher <github@matthiasm.com>2023-04-14 16:54:11 +0200
commite18b5353cd1931421db376ac4ace4000dfffa86c (patch)
tree21287b785750561712a051a41f18e75064682e66 /FL/Fl_Text_Buffer.H
parentafd3fde5de41cd5c10e0953e25976912cf4cf25f (diff)
Fixed leak in Fl_Text_Buffer #716
Diffstat (limited to 'FL/Fl_Text_Buffer.H')
-rw-r--r--FL/Fl_Text_Buffer.H18
1 files changed, 17 insertions, 1 deletions
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
@@ -328,12 +328,28 @@ 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);