mirror of
https://github.com/junegunn/fzf.git
synced 2026-11-11 20:05:55 +00:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
314cbe1be7 |
No files matched your search
@@ -1,6 +1,10 @@
|
||||
CHANGELOG
|
||||
=========
|
||||
|
||||
0.75.1
|
||||
------
|
||||
- Fixed `--info inline-right:PREFIX` leaving part of the previous output when the info gets shorter (#4953)
|
||||
|
||||
0.75.0
|
||||
------
|
||||
- Added `{change,transform,bg-transform}-info-command` actions (#4951) (@casperdcl)
|
||||
|
||||
+4
-1
@@ -3664,7 +3664,10 @@ func (t *Terminal) printInfoImpl() {
|
||||
pos++
|
||||
}
|
||||
} else {
|
||||
pos = max(pos, t.window.Width()-outputLen-util.StringWidth(t.infoPrefix)-1)
|
||||
move(line, pos, false)
|
||||
newPos := max(pos, t.window.Width()-outputLen-util.StringWidth(t.infoPrefix)-1)
|
||||
t.window.Print(strings.Repeat(" ", newPos-pos))
|
||||
pos = newPos
|
||||
printInfoPrefix()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1792,6 +1792,13 @@ class TestCore < TestInteractive
|
||||
tmux.until { assert_match(%r{ 0/100000}, it[-1]) }
|
||||
end
|
||||
|
||||
def test_info_inline_right_prefix_clearance
|
||||
tmux.send_keys "seq 100000 | #{FZF} --info 'inline-right:xx '", :Enter
|
||||
tmux.until { assert_match(%r{xx 100000/100000}, it[-1]) }
|
||||
tmux.send_keys 'x'
|
||||
tmux.until { assert_match(%r{ xx 0/100000}, it[-1]) }
|
||||
end
|
||||
|
||||
def test_info_command
|
||||
tmux.send_keys(%(seq 10000 | #{FZF} --separator x --info-command 'echo -e "--\\x1b[33m$FZF_POS\\x1b[m/$FZF_INFO--"'), :Enter)
|
||||
tmux.until { assert_match(%r{^ --1/10000/10000-- xx}, it[-2]) }
|
||||
|
||||
Reference in new issue
Block a user