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:
parent
84499e5900
commit
5a8fdbe9bc
@ -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
|
||||
}
|
||||
|
@ -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:
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user