m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-17 07:43:39 -05:00

Ignore xterm OSC control sequences

- OSC Ps ; Pt BEL
- OSC Ps ; Pt ST

Fix #1415
This commit is contained in:
Junegunn Choi
2020-03-03 20:55:29 +09:00
parent 6db15e8693
commit dd49e41c42
2 changed files with 14 additions and 1 deletions

View File

@@ -1716,6 +1716,18 @@ class TestGoFZF < TestBase
tmux.prepare
end
def test_strip_xterm_osc_sequence
%W[\x07 \x1b\\].each do |esc|
writelines tempname, [%(printf $1"\e]4;3;rgb:aa/bb/cc#{esc} "$2)]
File.chmod(0o755, tempname)
tmux.prepare
tmux.send_keys(
%(echo foo bar | #{FZF} --preview '#{tempname} {2} {1}'), :Enter
)
tmux.until { |lines| lines.any_include?('bar foo') }
tmux.send_keys :Enter
end
end
end
module TestShell