Rename to "scrollto"

The "cursor" field in the settext command should really be scroll-to,
for things like page up / page down.

WIP, this patch should become the actual pgup/pgdown impl.
This commit is contained in:
Raph Levien 2016-04-04 17:14:06 -07:00
parent 12bd4515db
commit 688e8b79db

View File

@ -204,7 +204,7 @@ class EditView: NSView {
self.lines = text["lines"]! as! [[AnyObject]]
self.linesStart = text["first_line"] as! Int
heightConstraint?.constant = (text["height"] as! CGFloat) * linespace + 2 * descent
if let cursor = text["cursor"] as? [Int] {
if let cursor = text["scrollto"] as? [Int] {
let line = cursor[0]
let col = cursor[1]
let x = CGFloat(col) * fontWidth // TODO: deal with non-ASCII, non-monospaced case