From c93f03b93734e1d2c475ee398f27c0f122b5c614 Mon Sep 17 00:00:00 2001 From: Tae Won Ha Date: Tue, 11 Jan 2022 13:24:48 +0100 Subject: [PATCH] Reformat --- NvimServer | 2 +- NvimView/Sources/NvimView/Typesetter.swift | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/NvimServer b/NvimServer index 764ba0e2..c4098c51 160000 --- a/NvimServer +++ b/NvimServer @@ -1 +1 @@ -Subproject commit 764ba0e2b54461f0bb433b76bcf2357ff9031285 +Subproject commit c4098c5114d0ad9428458bc79293646bc4a41865 diff --git a/NvimView/Sources/NvimView/Typesetter.swift b/NvimView/Sources/NvimView/Typesetter.swift index 88824210..0b17ed30 100644 --- a/NvimView/Sources/NvimView/Typesetter.swift +++ b/NvimView/Sources/NvimView/Typesetter.swift @@ -130,9 +130,7 @@ final class Typesetter { CGPoint(x: offset.x + i.cgf * cellWidth, y: offset.y) } - return [ - FontGlyphRun(font: font, glyphs: Array(glyphs[range]), positions: positions), - ] + return [FontGlyphRun(font: font, glyphs: Array(glyphs[range]), positions: positions)] } } @@ -257,9 +255,7 @@ final class Typesetter { nvimUtf16Cells.withUnsafeBufferPointer { pointer -> [UInt16] in let count = pointer.reduce(0) { acc, elem in acc + elem.count } - return [Unicode.UTF16.CodeUnit]( - unsafeUninitializedCapacity: count - ) { resultPtr, initCount in + return [Unicode.UTF16.CodeUnit](unsafeUninitializedCapacity: count) { resultPtr, initCount in var i = 0 for k in 0..