1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-09-11 17:15:34 +03:00

Refactor slightly

This commit is contained in:
Tae Won Ha 2023-12-17 14:27:41 +01:00
parent 8712640f07
commit 12b3aa4d8c
No known key found for this signature in database
GPG Key ID: E40743465B5B8B44
3 changed files with 10 additions and 8 deletions

View File

@ -6,6 +6,14 @@
import Cocoa
extension NvimView {
@IBAction public func debug1(_: Any?) {
do { try self.ugrid.dump() } catch { self.log.error("Could not dump UGrid: \(error)") }
}
@IBAction public func debug2(_: Any?) {
self.log.debug("Nothing yet")
}
func draw(cellGridIn context: CGContext) {
context.saveGState()
defer { context.restoreGState() }

View File

@ -14,11 +14,11 @@ extension NvimView {
if self.isInitialResize {
self.isInitialResize = false
let size = self.discreteSize(size: newSize)
self.ugrid.resize(size)
self.launchNeoVim(size)
return
}

View File

@ -274,12 +274,6 @@ public final class NvimView: NSView, NSUserInterfaceValidations, NSTextInputClie
@available(*, unavailable)
public required init?(coder _: NSCoder) { fatalError("init(coder:) has not been implemented") }
@IBAction public func debug1(_: Any?) {
#if DEBUG
do { try self.ugrid.dump() } catch { self.log.error("Could not dump UGrid: \(error)") }
#endif
}
// MARK: - Internal
let queue = DispatchQueue(