mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-11-16 10:15:09 +00:00
parent
61feee690c
commit
ca42e5e00a
@ -1532,7 +1532,7 @@ func (t *Terminal) Loop() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
var focused *Item
|
var focusedIndex int32 = minItem.Index()
|
||||||
var version int64 = -1
|
var version int64 = -1
|
||||||
for {
|
for {
|
||||||
t.reqBox.Wait(func(events *util.Events) {
|
t.reqBox.Wait(func(events *util.Events) {
|
||||||
@ -1549,10 +1549,14 @@ func (t *Terminal) Loop() {
|
|||||||
t.printInfo()
|
t.printInfo()
|
||||||
case reqList:
|
case reqList:
|
||||||
t.printList()
|
t.printList()
|
||||||
currentFocus := t.currentItem()
|
var currentIndex int32 = minItem.Index()
|
||||||
if currentFocus != focused || version != t.version {
|
currentItem := t.currentItem()
|
||||||
|
if currentItem != nil {
|
||||||
|
currentIndex = currentItem.Index()
|
||||||
|
}
|
||||||
|
if focusedIndex != currentIndex || version != t.version {
|
||||||
version = t.version
|
version = t.version
|
||||||
focused = currentFocus
|
focusedIndex = currentIndex
|
||||||
if t.isPreviewEnabled() {
|
if t.isPreviewEnabled() {
|
||||||
_, list := t.buildPlusList(t.preview.command, false)
|
_, list := t.buildPlusList(t.preview.command, false)
|
||||||
t.cancelPreview()
|
t.cancelPreview()
|
||||||
|
Loading…
Reference in New Issue
Block a user