Skip to content
Myr

Do not ignore current query when input is hidden

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

* The initial query given by --query should be respected * The current query should still be respected after `hide-input` (or `toggle-input) Fix #4327

authored by Junegunn Choi · committed by Junegunn Choi · parent 6223862 · Browse files · 2 files+11 added−4 removed
This commit

State

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

Diff stats

2 files+11 added−4 removed

  • tests:+10 added−0 removed
  • other:+1 added−4 removed

2 files+11 added−4 removed

modified:src/terminal.go+1 added-4 removed
1416 unmodified lines
1417func (t *Terminal) Input() (bool, []rune) {1418 t.mutex.Lock()1419 defer t.mutex.Unlock()1420 paused := t.paused1421 var src []rune1422 if !t.inputless {1423 src = t.input1421 src := t.input1424 }1422 if t.inputOverride != nil {1423 paused = false1424 src = *t.inputOverride1425 }
4900 unmodified lines
modified:test/test_core.rb+10 added
1854 unmodified lines
1855 tmux.until { |lines| assert_includes lines[line + 4], "> 5" }1856 tmux.send_keys :Space1857 tmux.until { |lines| assert_includes lines[line + 2], "> 5" }1858 end18591860 def test_no_input_query1861 tmux.send_keys %(seq 1000 | #{FZF} --no-input --query 555 --bind space:toggle-input), :Enter1862 tmux.until { |lines| assert_includes lines, '> 555' }1863 tmux.send_keys :Space1864 tmux.until do |lines|1865 assert_equal 1, lines.match_count1866 assert_includes lines, '> 555'1867 end1868 end1869end