class documentation

class SaveCursorContext(object): (source)

View In Hierarchy

Context manager used by TextBuffer.tmp_cursor()

This allows syntax like:

        with buffer.tmp_cursor(iter):
                # some manipulation using iter as cursor position

        # old cursor position restored

Basically it keeps a mark for the old cursor and restores it after exiting the context.

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

Undocumented

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

Undocumented

def __init__(self, buffer, iter=None, gravity=GRAVITY_LEFT): (source)

Undocumented

buffer = (source)

Undocumented

gravity = (source)

Undocumented

iter = (source)

Undocumented

mark = (source)

Undocumented