mirror of
https://github.com/xi-editor/xi-mac.git
synced 2024-10-05 19:49:12 +03:00
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:
parent
12bd4515db
commit
688e8b79db
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user