1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-12-25 23:02:35 +03:00

Add some comments regarding two-cell-characters

This commit is contained in:
Tae Won Ha 2016-06-29 21:55:16 +02:00
parent 84499e5900
commit 5a8fdbe9bc
No known key found for this signature in database
GPG Key ID: E40743465B5B8B44
3 changed files with 7 additions and 1 deletions

View File

@ -159,6 +159,11 @@ class Grid: CustomStringConvertible {
}
func put(string: String) {
// FIXME: handle the following situation:
// |abcde | <- type
// =>
// |abcde>| <- ">" at the end of the line is wrong -> the XPC could tell the main app whether the string occupies
// | | two cells using vim_strwidth()
self.cells[self.position.row][self.position.column] = Cell(string: string, attrs: self.attrs)
self.position.column += 1
}

View File

@ -56,7 +56,7 @@ extension NeoVimView: NSTextInputClient {
}
public func insertText(aString: AnyObject, replacementRange: NSRange) {
Swift.print("\(#function): \(aString), \(replacementRange)")
// Swift.print("\(#function): \(aString), \(replacementRange)")
switch aString {
case let string as String:

View File

@ -105,6 +105,7 @@ extension NeoVimView: NeoVimUiBridgeProtocol {
DispatchUtils.gui {
// Swift.print("\(#function): \(string)")
let curPos = Position(row: self.grid.position.row, column: self.grid.position.column)
// Swift.print("\(#function): \(curPos) -> \(string)")
self.grid.put(string)
self.setNeedsDisplayAt(position: curPos)