class documentation

class UserActionContext(object): (source)

View In Hierarchy

Context manager to wrap actions in proper user-action signals

This class used for the TextBuffer.user_action attribute

This allows syntax like:

        with buffer.user_action:
                buffer.insert(...)

instead off:

        buffer.begin_user_action()
        buffer.insert(...)
        buffer.end_user_action()

By wrapping actions in this "user-action" block the UndoStackManager will see it as a single action and make it undo-able in a single step.

Method __enter__ Undocumented
Method __exit__ Undocumented
Method __init__ Undocumented
Instance Variable buffer Undocumented
def __enter__(self): (source)

Undocumented

def __exit__(self, *a): (source)

Undocumented

def __init__(self, buffer): (source)

Undocumented

buffer = (source)

Undocumented