mirror of
https://github.com/Morantron/tmux-fingers.git
synced 2026-09-10 07:26:32 -04:00
fix active pane retrieval when passing a format as target
This commit is contained in:
parent
e5d8f3ce42
commit
963ca74c9e
|
|
@ -167,7 +167,7 @@ module Fingers::Commands
|
|||
@active_pane = target_pane
|
||||
else
|
||||
@pane_id = tmux.exec("display-message -t #{pane_target_format} -p '\#{pane_id}'").chomp
|
||||
@active_pane = tmux.list_panes("\#{pane_active}").first
|
||||
@active_pane = tmux.list_panes("\#{pane_active}", target_pane.window_id).first
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
10
src/tmux.cr
10
src/tmux.cr
|
|
@ -134,8 +134,14 @@ class Tmux
|
|||
@version = Tmux.tmux_version_to_semver(version_string)
|
||||
end
|
||||
|
||||
def list_panes(filters = "") : Array(Pane)
|
||||
args = ["list-panes", "-a", "-F", PANE_FORMAT]
|
||||
def list_panes(filters = "", target = nil) : Array(Pane)
|
||||
args = ["list-panes", "-F", PANE_FORMAT]
|
||||
|
||||
if target.nil?
|
||||
args << "-a"
|
||||
else
|
||||
args.concat(["-t", target])
|
||||
end
|
||||
|
||||
if !filters.empty?
|
||||
args.concat(["-f", filters])
|
||||
|
|
|
|||
Loading…
Reference in a new issue