m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-14 22:33:47 -05:00

Make transform*, --info-command, and execute-silent cancellable

Users can press CTRL-C after 1 second to terminate the command.

Close #3883
This commit is contained in:
Junegunn Choi
2024-06-20 23:18:28 +09:00
parent db01e7dab6
commit 7c2ffd3fef
4 changed files with 92 additions and 29 deletions

View File

@@ -137,8 +137,11 @@ func TestOnce(t *testing.T) {
if o() {
t.Error("Expected: false")
}
if o() {
t.Error("Expected: false")
if !o() {
t.Error("Expected: true")
}
if !o() {
t.Error("Expected: true")
}
o = Once(true)
@@ -148,6 +151,9 @@ func TestOnce(t *testing.T) {
if o() {
t.Error("Expected: false")
}
if o() {
t.Error("Expected: false")
}
}
func TestRunesWidth(t *testing.T) {