PoC: add support for all known pane modes #39
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi @erickpintor, I want to bring to your attention that the way the pane-modes are currently displayed is incorrect. The error occurs on this line (and the related line 2 lines above), where it's assumed that if a pane is in a mode, it's necessarily in copy mode.
I'm not sure if it was the case that tmux only had copy mode back in 2015 when this plugin was first created, but in its present version, it now contains a number of different pane modes. The ones that I've been able to identify besides copy mode are:
list-keys
command, or the defaultprefix + ?
keybind)choose-tree
command, or the defaultprefix + s
andprefix + w
keybinds)choose-client
command, or the defaultprefix + D
keybind)choose-buffer
command, or the defaultprefix + =
keybind)customize-mode
command)clock-mode
command, or the defaultprefix + t
keybind)This PR contains a quick and dirty patch I did to add support for these additional pane modes. And you can see some examples below:
View mode:
Copy mode:
Buffer mode:
At this point, I just want to bring this to your attention as I already mentioned, and I do not intend this to be the final version that gets merged, should you agree that this is indeed in need of fixing. And if that's indeed the case, here are some implementation details that would need to be addressed:
copy_mode
, probably something likepane_mode
is more aptprefix_highlight_tree_prompt
andprefix_highlight_options_prompt
, which are currently hardcoded asTree
andOpts
respectively