SourceBuffer.setMaxUndoLevels

Sets the number of undo levels for user actions the buffer will track. If the number of user actions exceeds the limit set by this function, older actions will be discarded. If max_undo_levels is -1, no limit is set. A new action is started whenever the function gtk_text_buffer_begin_user_action() is called. In general, this happens whenever the user presses any key which modifies the buffer, but the undo manager will try to merge similar consecutive actions, such as multiple character insertions into one action. But, inserting a newline does start a new action.

class SourceBuffer
void
setMaxUndoLevels

Parameters

maxUndoLevels int

the desired maximum number of undo levels.

Meta