Skip to content
Myr

Redraw item if query string has changed

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent b29375c · Browse files · 1 file+4 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−1 removed

  • other:+4 added−1 removed

1 file+4 added−1 removed

modified:src/terminal.go+4 added-1 removed
44 unmodified lines
45type itemLine struct {46 current bool47 selected bool48 label string49 queryLen int50 width int51 result Result52}53
683 unmodified lines
737 label = ">"738 }739740 // Avoid unnecessary redraw740 newLine := itemLine{current: current, selected: selected, label: label, result: *result, width: 0}741 newLine := itemLine{current: current, selected: selected, label: label,742 result: *result, queryLen: len(t.input), width: 0}743 prevLine := t.prevLines[i]744 if prevLine.current == newLine.current &&745 prevLine.selected == newLine.selected &&746 prevLine.label == newLine.label &&747 prevLine.queryLen == newLine.queryLen &&748 prevLine.result == newLine.result {749 return750 }751
1036 unmodified lines