Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.2 questions and comments #2645

Closed
nicm opened this issue Apr 13, 2021 · 108 comments
Closed

3.2 questions and comments #2645

nicm opened this issue Apr 13, 2021 · 108 comments

Comments

@nicm
Copy link
Member

nicm commented Apr 13, 2021

Ask or discuss any quick questions here about 3.2 please.

Bug reports please open a new issue with full information, see CONTRIBUTING.

The 3.2 CHANGES file is here.

As always, thanks to the many people who contributed to both this and to previous releases.


There are a lot of changes in this release, these are the most notable, for more see the CHANGES file:

  • How data is sent to control mode clients has been completely revamped to both be more fair with multiple panes and to prevent huge amounts of data being backed up; this feature is used by default when tmux is attached with the latest iTerm2 nightly builds.

  • Configuration file parsing has changed slightly: the contents of the new {} syntax introduced in 3.1 must now be valid tmux command syntax; and to allow formats to be annotated, strings given with quotes may now contain newlines (leading spaces and comments are stripped).

  • A new customize mode available with C-b C (C-b S-c) which allows options and key bindings to be browsed and changed interactively.

  • Support for extended keys offered by some terminals (xterm, mintty, iTerm2), see https://github.com/tmux/tmux/wiki/Modifier-Keys#extended-keys.

  • A pane-border-lines option to change the characters used to draw the pane border separators.

  • How UTF-8 data is stored has been rewritten to reduce memory use for characters in the BMP.

  • The message log (C-b ~) has been changed to be per server instead of per client and to have some useful content.

  • Client flags have been extended (refresh-client -F becomes -f and also added for attach-session and new-session), and a read-only flag added (same as -r to attach-session).

  • A new active-pane client flag that if given allows a client to have its own active pane for each window rather than being tied to the server's active pane.

  • Improved command-prompt completion including showing a menu of completions.

  • All style options can now be formats, for example the default pane-active-border-style now changes colour depending on pane_in_mode and synchronize-panes.

  • Search match count has come back in copy mode, as well as performance improvements and additional styles for marking of search terms.

  • Try $XDG_CONFIG_HOME/tmux/tmux.conf as well as ~/.config/tmux/tmux.conf.

  • Window and pane hooks such as window-layout-changed and pane-exited are now window or pane options instead of session options.

  • copy-pipe and friends can now be given with no arguments in which case they get the command from a new copy-command option. The default copy commands all now use copy-pipe. This makes it much easier to configure copy-pipe for all copy key bindings.

  • Terminal detection and feature code has been rewritten. tmux now collects sets of related terminfo(5) capabilties together with sensible default values into named "terminal features" which makes them easier to configure via a new terminal-features option or -T flag to tmux itself. tmux can detect and will automatically configure a number of common, modern terminal emulators.

  • Support for per-client overlay popups with a new display-popup command. A popup is also used for an e key binding in buffer mode to edit a buffer using the editor given in the new editor option (filled in from the EDITOR or VISUAL environment variables by default).

  • DoubleClick and TripleClick mouse key bindings have changed so that only one is fired. Behaviour similar to the old double-click key binding is now available as SecondClick. There are now default double- and triple-click bindings to copy a word or line, and a default middle-click binding to paste the top buffer.

  • When a server socket is given with -S, it is now created with umask 177 rather than 117.


Note the following known potentially-incompatible changes:

  • The {} syntax added in tmux 3.1 has changed so that the contents must follow the syntax of tmux commands.

  • The DoubleClick key binding is not fired on the way to TripleClick; only one is fired. The new SecondClick key binding behaves similarly to the old DoubleClick.

  • status-fg and status-bg are now applied before status-style rather than instead of; this means that if either is set to default the status-style colour will be used. To fix, replace status-bg default with status-style bg=default.

@nicm nicm pinned this issue Apr 13, 2021
@hanh090
Copy link

hanh090 commented Apr 13, 2021

I want to ask a question related to pane-title length, if I have a long command seems like it was truncated to 80 chars only, I am using version 3.1c, is that fix in latest version?

@nicm
Copy link
Member Author

nicm commented Apr 13, 2021

tmux should not truncate it, how are you setting it?

@hanh090
Copy link

hanh090 commented Apr 13, 2021

@nicm my setup is here: https://github.com/hanh090/dotfiles/blob/master/.tmux.conf when I run it in REPL, it always truncate for lower 80 characters. But I was found a workaround solution, I wrap it in a function, then problem solved

@nicm
Copy link
Member Author

nicm commented Apr 13, 2021

Sounds like a problem with your shell then.

@hanh090
Copy link

hanh090 commented Apr 13, 2021

Sounds like a problem with your shell then.

g1XgqVscSn
this is sample, can you try it?

@nicm
Copy link
Member Author

nicm commented Apr 13, 2021

I don't know what you are asking. If it works when you wrap it in a shell function it must be a shell problem not a tmux one.

@pschmitt
Copy link

Congrats on the new release!

I'm currently trying to build a termux package for it but I'm not able to go past the ./configure step:

[...]
checking for strndup... yes
checking for strsep... yes
checking for strtonum... no
checking for working strnlen... yes
checking for working reallocarray... configure: error: in `/home/builder/.termux-build/tmux/src':
configure: error: cannot run test program while cross compiling
See `config.log' for more details

Can someone give me a hint? Cross-compiling is hard :)

@nicm
Copy link
Member Author

nicm commented Apr 13, 2021

Did this work before? ISTR someone complaining that autoconf cannot run some tests while crosscompiling. You may need to patch configure.ac to hardcode this test for your platform and regenerate configure, or just patch configure.

@pschmitt
Copy link

For 3.1c it worked fine, yes.

I'll try to craft a quick patch to disable the check, even though I really don't if it is safe to assume that reallocarray is available (or not?) on Android.

@nicm
Copy link
Member Author

nicm commented Apr 13, 2021

Not sure if it has it or not but if you assume it is not present it should be OK.

@pschmitt
Copy link

Thanks for your help. I've submitted my PR to termux-packages.

🥳 Greetings from Termux!

image

@bertin0
Copy link

bertin0 commented Apr 13, 2021

Just got this update on Arch, and it seems to have broken my user-key binding for using Ctrl+; to switch panes (i use jkl; instead of hjkl):

set -s user-keys[0] "\e[27;5;59~"
bind User0 next-window

@nicm
Copy link
Member Author

nicm commented Apr 13, 2021

What happens if you bind C-+ instead?

@bertin0
Copy link

bertin0 commented Apr 13, 2021

Unsure how i would test that, as both of my terminals (alacritty ant termite) use it to zoom in and I don't know what escape sequence it would have. I tested C-', C-., C-, and none worked. (for the escape sequences generated by termite).

@nicm
Copy link
Member Author

nicm commented Apr 13, 2021

Oh sorry I meant C-;.

@bertin0
Copy link

bertin0 commented Apr 13, 2021

Nope, C-; or C-\; didn't work for me

@nicm
Copy link
Member Author

nicm commented Apr 13, 2021

Does this fix it?

--- tty-keys.c  13 Apr 2021 05:23:34 -0000      1.145
+++ tty-keys.c  13 Apr 2021 11:36:30 -0000
@@ -969,6 +969,8 @@ tty_keys_extended_key(struct tty *tty, c
                                onlykey = 0;
                        else if (onlykey == 63)
                                onlykey = 127;
+                       else
+                               onlykey |= KEYC_CTRL;
                        onlykey |= ((nkey & KEYC_MASK_MODIFIERS) & ~KEYC_CTRL);
                }
                nkey = onlykey;

@nicm
Copy link
Member Author

nicm commented Apr 13, 2021

@bertin0
Copy link

bertin0 commented Apr 13, 2021

Unfortunately not. Without that patch, tmux woutld just output ; on C-;, with this patch it seems to not do anything. (both for User0 and C-\;/C-;

@nicm
Copy link
Member Author

nicm commented Apr 13, 2021

It works for me, open a new issue with logs please.

@boris-petrov
Copy link

@nicm - thanks for the new release! I want to go back to this discussion we had. 3.2 shows correctly the matched count when searching, however it doesn't show which match I am on while going back through them with n. For example, tmux 3.0 showed (1/3 results) when I search for something, then 2/3 on the next result and so on. tmux 3.2 shows only (3 results) with no indication which result I'm on right now.

Is it possible to bring back the old behavior?

@bertin0
Copy link

bertin0 commented Apr 13, 2021

It works for me, open a new issue with logs please.

Sorry, I must have not reloaded my conf properly, it works now! Thanks for the quick fix!

@nicm
Copy link
Member Author

nicm commented Apr 13, 2021

OK I have applied this and it will be in 3.2a but I will wait for a while to see if there is anything else.

LeonGr pushed a commit to LeonGr/dotfiles that referenced this issue Apr 13, 2021
@cah-justin-pitts02
Copy link

I encountered a parsing issue in .tmux.conf and I fixed it but could not find any documentation related directly to the issue.

This:
bind-key m send-keys -t 0.{top-left} n
used to work.

Now I get a syntax error on this line on startup.

If i quote the argument to -t like so
bind-key m {send-keys -t ':0.{top-left}' n}
It does work.

Looking at the server log, it appears the lexer was not getting the close brace for top-left.

@sschlesier
Copy link

I have a similar issue to @cah-justin-pitts02

I've been using the below for some time, in 3.2 it results in a syntax error.

# Create new pane in current directory
bind -n M-n split-window -b -t :.{top-left} -c "#{pane_current_path}"

I've not yet puzzled out how to fix this line. I assume it has something to do with the breaking changes to the {} syntax mentioned above. I did not find any other documentation about what those changes are.

@cah-justin-pitts02
Copy link

@sschlesier strange - that works unmodified for me. If I were to apply my fix to your line, it would be

bind -n M-n split-window -b -t ':.{top-left}' -c "#{pane_current_path}"

@JonRowe
Copy link

JonRowe commented Apr 13, 2021

Did something change for named sessions? tmux new -s <name> now immediatly exits and deposits a rubbish string from iterm

Edit Problem lay between chair and keyboard (I still had an active session and tmux didn't like that)

@nicm
Copy link
Member Author

nicm commented Apr 13, 2021

@JonRowe most likely your shell or default-command doesn't work so tmux immediately exits.

@nicm
Copy link
Member Author

nicm commented May 12, 2021

You should be able to use command-alias for that, but how is configuring it in tmux any different from configuring it in vim?

@smhc
Copy link

smhc commented May 12, 2021

Not a lot different. In theory there could be multiple applications using load-buffer and you want a single place to configure whether OSC-52 is used or not. There's an argument that some users would want tmux config to control whether it occurs or not.

It's also not ideal to override the neovim config that supports tmux out of the box. I suppose neovim could add a 'g:tmux_clipboard_osc52=1' flag which adds this -w flag instead of having users duplicate the core clipboard config to add the extra flag. If tmux won't add the '-w by default' behaviour this might be an enhancement I raise with neovim.

Also I find it a bit odd that there are ways to force OSC-52 behaviour with 'select/mouse copy to tmux buffer' - but then get inconsistent behaviour when 'things' other than mouse/select copy to tmux buffers.

@MiralDesai
Copy link

MiralDesai commented May 13, 2021

Question, am I right in thinking a bunch of keyboard shortcuts no longer work in this version? I'm using mac os big sur, I have one laptop with tmux 3.2 running and another with the same OS and tmux 3.1c running. Both using the same .tmux.conf.

On 3.1c I can switch between panes with option + cmd + arrow keys.

I can also resize panes by first hitting my modifier key(default C^b in my case) then doing option + arrow keys

Both of these no longer work in 3.2. Just curious if there's anything I need to do to get these working again, from what I understand these were default commands that work without requiring anything in .tmux.conf

@nicm
Copy link
Member Author

nicm commented May 13, 2021

Do they work if you build tmux from master?

@MiralDesai
Copy link

MiralDesai commented May 14, 2021

Can confirm it does work on a master build.

axelf4 added a commit to axelf4/dotfiles that referenced this issue May 15, 2021
In order to make the status bar transparent, the status-bg variable
was set to the default background color. However, with tmux 3.2 this
no longer has the intended effect, as mentioned in the release post:

> status-fg and status-bg are now applied before status-style rather
> than instead of; this means that if either is set to default the
> status-style colour will be used. To fix, replace status-bg default
> with status-style bg=default.

This commit fixes the issue by applying the suggestion.

See: tmux/tmux#2645
namjul pushed a commit to namjul/dotfiles that referenced this issue May 19, 2021
`status-fg` and `status-bg` are now applied before `status-style` rather than instead of; this means that if either is set to `default` the `status-style` colour will be used. To fix, replace `status-bg` default with `status-style bg=default`.

- tmux/tmux#2645
@rfrancoise
Copy link

Hi @nicm, any update on a 3.2a release?

@nicm
Copy link
Member Author

nicm commented May 24, 2021

@rfrancoise no I have not had time yet.

@brc
Copy link

brc commented May 25, 2021

@nicm

It was removed because it didn't work in 3.1, it is much faster not to try and keep track of it, and neither vi or emacs show a match count. I don't think we need it.

we don't really need it (especially if it affects performance or isn't O(1) time), but i find the total number of matches to be an extremely helpful indicator—it immediately orients me and sets my expectations as to the usefulness of my search. i don't really care whether i'm on match 7 of 18, but i care to know there are 18 results and not 18,000 when i start pressing n.   :-)

@topcat001
Copy link
Contributor

The total number of matches is already displayed currently (if it does not time out). Does that address your needs? I might have missed something here.

I am planning to bring back the current match counter using a more efficient method which will not search the whole thing every time; just didn't get to it yet. Hopefully soon and then we can see how well it works.

@ltning
Copy link

ltning commented May 27, 2021

After upgrading from 3.1c to 3.2, mouse handling seems broken in my use case, which involves nesting (two levels) of tmux.
Mouse events (scrolling, in particular) are passed to the outermost tmux only, whereas previously they would be passed to whichever pane had focus.
I've tried to read the changelog (to the point that my eyes are now running ;), but apart from the "it's a lot", nothing obvious stands out.

Halp?

@nicm
Copy link
Member Author

nicm commented May 27, 2021

If you do printf "\033[?1000h\033[?1006h";cat in a shell inside the outer tmux and click the mouse, do you see mouse sequences printed?

@ltning
Copy link

ltning commented May 27, 2021

In outer tmux session, yes:

$ printf "\033[?1000h\033[?1006h";cat
^[[<0;105;25M^[[<0;105;25m

@nicm
Copy link
Member Author

nicm commented May 27, 2021

What does tmux show -g mouse show in the inner tmux?

@ltning
Copy link

ltning commented May 27, 2021

$ tmux show -g mouse
mouse on

in both inner and outer tmux.

@nicm
Copy link
Member Author

nicm commented May 27, 2021

Open a new issue please with logs from the inner tmux.

@ltning
Copy link

ltning commented May 27, 2021

Ok - how do I collect relevant logs?

@nicm
Copy link
Member Author

nicm commented May 27, 2021

@ltning
Copy link

ltning commented May 27, 2021

Thanks, and sorry for being dense and not looking that up myself. Issue raised, #2721 .

@brc
Copy link

brc commented May 28, 2021

The total number of matches is already displayed currently (if it does not time out). Does that address your needs? I might have missed something here.

@topcat001 Doh. 🤦‍♂️ Thank you. That's my bad since I haven't actually used 3.2 yet (I will unpin 3.1_c when I feel ready). It wasn't clear from the comments whether there still was a total-matches number anymore, so I chimed in about the use-case of total vs. current. 👍

loliee added a commit to loliee/dotfiles that referenced this issue May 31, 2021
@systemmonkey42
Copy link

systemmonkey42 commented Jun 5, 2021

Hi,

What is the most effective way to get #{...} expanded in the display-popup command?

I'm trying to pass information about the current pane to the popup command, but I get literal #{pane_current_path} and #{pane_id} because expansion processing isnt working how I would expect.

Thanks

EDIT: Solved with "run -C display-popup" . I just temporarily forgot how to nest all the quotes...

@nicm
Copy link
Member Author

nicm commented Jun 7, 2021 via email

@nicm nicm closed this as completed Jun 10, 2021
@nicm nicm unpinned this issue Jun 10, 2021
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests