mirror of
https://github.com/qvacua/vimr.git
synced 2024-12-25 23:02:35 +03:00
refactor: sink _unmarkText
This commit is contained in:
parent
918fc44889
commit
bb8b920d0c
@ -59,18 +59,7 @@ public extension NvimView {
|
||||
.deleteCharacters(length, andInputEscapedString: self.vimPlainString(text))
|
||||
.wait()
|
||||
|
||||
if length > 0 {
|
||||
self.ugrid.unmarkCell(at: self.markedPosition)
|
||||
self.markForRender(position: self.markedPosition)
|
||||
if self.ugrid.isNextCellEmpty(self.markedPosition) {
|
||||
self.ugrid.unmarkCell(at: self.markedPosition.advancing(row: 0, column: 1))
|
||||
self.markForRender(position: self.markedPosition.advancing(row: 0, column: 1))
|
||||
}
|
||||
}
|
||||
|
||||
self.lastMarkedText = self.markedText
|
||||
self.markedText = nil
|
||||
self.markedPosition = .null
|
||||
if self.hasMarkedText() { _unmarkText() }
|
||||
self.keyDownDone = true
|
||||
}
|
||||
|
||||
@ -195,6 +184,11 @@ public extension NvimView {
|
||||
}
|
||||
|
||||
func unmarkText() {
|
||||
_unmarkText()
|
||||
self.keyDownDone = true
|
||||
}
|
||||
|
||||
func _unmarkText() {
|
||||
let position = self.markedPosition
|
||||
self.ugrid.unmarkCell(at: position)
|
||||
self.markForRender(position: position)
|
||||
@ -205,7 +199,6 @@ public extension NvimView {
|
||||
|
||||
self.markedText = nil
|
||||
self.markedPosition = .null
|
||||
self.keyDownDone = true
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user