1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-10-28 03:38:54 +03:00

Make uuid of NeoVimView public

This commit is contained in:
Tae Won Ha 2016-07-10 14:14:02 +02:00
parent b1af87bc5c
commit 1da03e56d4
No known key found for this signature in database
GPG Key ID: E40743465B5B8B44

View File

@ -54,8 +54,29 @@ private struct RowRun: CustomStringConvertible {
public class NeoVimView: NSView {
public let uuid = NSUUID().UUIDString
public var delegate: NeoVimViewDelegate?
let agent: NeoVimAgent
let grid = Grid()
var markedText: String?
/// We store the last marked text because Cocoa's text input system does the following:
/// -> hanja popup -> insertText() -> attributedSubstring...() -> setMarkedText() -> ...
/// We want to return "" in attributedSubstring...()
var lastMarkedText: String?
var markedPosition = Position.null
var keyDownDone = true
var xOffset = CGFloat(0)
var yOffset = CGFloat(0)
var cellSize = CGSize.zero
var descent = CGFloat(0)
var leading = CGFloat(0)
private let drawer: TextDrawer
private var font: NSFont {
didSet {
self.drawer.font = self.font
@ -68,32 +89,10 @@ public class NeoVimView: NSView {
}
}
var xOffset = CGFloat(0)
var yOffset = CGFloat(0)
private let drawer: TextDrawer
let agent = NeoVimAgent(uuid: NSUUID().UUIDString)
var markedText: String?
/// We store the last marked text because Cocoa's text input system does the following:
/// -> hanja popup -> insertText() -> attributedSubstring...() -> setMarkedText() -> ...
/// We want to return "" in attributedSubstring...()
var lastMarkedText: String?
var markedPosition = Position.null
var keyDownDone = true
var cellSize = CGSize.zero
var descent = CGFloat(0)
var leading = CGFloat(0)
let grid = Grid()
override init(frame rect: NSRect = CGRect.zero) {
self.font = NSFont(name: "Menlo", size: 16)!
self.drawer = TextDrawer(font: font)
self.agent = NeoVimAgent(uuid: self.uuid)
super.init(frame: rect)