Add persistent undo as the option

This commit is contained in:
Zachary Yedidia
2016-05-29 11:02:56 -04:00
parent 1fe18eecb7
commit ee9f2a3d9c
9 changed files with 116 additions and 141 deletions

View File

@@ -74,6 +74,11 @@ func (c *Cursor) Clamp() {
}
}
func (c *Cursor) Goto(b Cursor) {
c.X, c.Y, c.LastVisualX = b.X, b.Y, b.LastVisualX
c.OrigSelection, c.CurSelection = b.OrigSelection, b.CurSelection
}
// SetLoc sets the location of the cursor in terms of character number
// and not x, y location
// It's just a simple wrapper of FromCharPos