Method GTK2.SourceBuffer()->set_max_undo_levels()


Method set_max_undo_levels

GTK2.SourceBuffer set_max_undo_levels(int setting)

Description

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 funcction, older actions will be discarded.

A new action is started whenever the function 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.