Closed jez closed 7 months ago
Related: #217
I think version detection would be appropriate, but that does open a can of worms since tmux is constantly changing features. The alternative is to say "sorry- try this tag of the plugin" to users with older versions of tmux. Perhaps version checking with a deprecation message?
Another option would be a global option that stores the tmux command and/or flags used to open the split, which defaults to the flags required by the latest tmux version but can be overridden for users who want to use older versions.
In any case I defer to you! Again I’m already happy with my solution of editing the files directly in the mean time.
The latest release of tmux appears to have completely dropped support for -p
and this plugin is no longer functional as a result.
I can confirm the fix in #217 restores the plugin's functionality when using tmux 3.4.
I wonder if that's deliberate, it looks like it's still supported, if I'm reading the code right: https://github.com/tmux/tmux/blob/608d113486835515e7a89b1511704440c68ae817/cmd-split-window.c#L97
That said, it looks like -l
has been around for at least 15 years, at least since tmux has been tracked in git, possibly longer: https://github.com/tmux/tmux/blame/fc6a65c6207dbefcd8b5f187148978f8d4111b2b/cmd-split-window.c#L91
I vote we just use -l
.
Closed via #217.
Using the
-p
flag onsplit-window
to say that the new splits size is a certain percentage has been deleted in 3.1, and will produce aSize missing
error when you try to callsplit-window
. The replacement is that the existing-l
flag can either take an exact number of lines (or columns if making a vertical split) specified like-l 10
or a percentage, specified using a percent sign like-l 20%
, which means the same as the old-p 20
.Relevant links:
tmux/tmux CHANGES
The manpage entry for
split-window
inman tmux
:I only use tmux version 3.1 or later on my personal machines, so I have simply patched this plugin locally to always use
-l ...%
instead of-p ...
.I leave it up to the maintainers of this project how to proceed with a proper fix. Either change the code to use
-l 10%
(which won't work on older versions of tmux, and thus might break existing Vimux users), or do some sort of version/feature detection to attempt to allow using Vimux with both old and new versions of tmux.As always, thanks for the work on this project.