1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-12-26 07:13:24 +03:00
This commit is contained in:
Tae Won Ha 2022-01-11 13:24:48 +01:00
parent 190e186264
commit c93f03b937
No known key found for this signature in database
GPG Key ID: E40743465B5B8B44
2 changed files with 3 additions and 7 deletions

@ -1 +1 @@
Subproject commit 764ba0e2b54461f0bb433b76bcf2357ff9031285 Subproject commit c4098c5114d0ad9428458bc79293646bc4a41865

View File

@ -130,9 +130,7 @@ final class Typesetter {
CGPoint(x: offset.x + i.cgf * cellWidth, y: offset.y) CGPoint(x: offset.x + i.cgf * cellWidth, y: offset.y)
} }
return [ return [FontGlyphRun(font: font, glyphs: Array(glyphs[range]), positions: positions)]
FontGlyphRun(font: font, glyphs: Array(glyphs[range]), positions: positions),
]
} }
} }
@ -257,9 +255,7 @@ final class Typesetter {
nvimUtf16Cells.withUnsafeBufferPointer { pointer -> [UInt16] in nvimUtf16Cells.withUnsafeBufferPointer { pointer -> [UInt16] in
let count = pointer.reduce(0) { acc, elem in acc + elem.count } let count = pointer.reduce(0) { acc, elem in acc + elem.count }
return [Unicode.UTF16.CodeUnit]( return [Unicode.UTF16.CodeUnit](unsafeUninitializedCapacity: count) { resultPtr, initCount in
unsafeUninitializedCapacity: count
) { resultPtr, initCount in
var i = 0 var i = 0
for k in 0..<pointer.count { for k in 0..<pointer.count {
let element = pointer[k] let element = pointer[k]