mirror of
https://github.com/Morantron/tmux-fingers.git
synced 2024-06-29 07:50:56 +02:00
safely chop highlight
This commit is contained in:
parent
31f7b6141e
commit
a0971e7a0d
|
@ -58,9 +58,9 @@ class ::Fingers::MatchFormatter
|
||||||
|
|
||||||
def chop_highlight(hint, highlight)
|
def chop_highlight(hint, highlight)
|
||||||
if hint_position == 'right'
|
if hint_position == 'right'
|
||||||
highlight[0..-(hint.length + 1)]
|
highlight[0..-(hint.length + 1)] || ""
|
||||||
else
|
else
|
||||||
highlight[hint.length..-1]
|
highlight[hint.length..-1] || ""
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user