Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: c3cd19b24b
Fetching contributors…

Cannot retrieve contributors at this time

22 lines (19 sloc) 0.346 kb
DocumentCursorStack {
classvar stack;
*initClass {
DocumentCursorStack.reset();
}
*push {|pos|
pos = pos ?? {Document.current.selectionStart};
stack.add(pos);
}
*pop {|jumpToPos=true|
var pos = stack.pop;
(jumpToPos && pos.notNil).if {
Document.current.selectRange(pos, 0);
};
}
*reset {
stack = LinkedList();
}
}
Jump to Line
Something went wrong with that request. Please try again.