j/cursor: routines for interactive editing