tmux-fzf-url icon indicating copy to clipboard operation
tmux-fzf-url copied to clipboard

Doesn't seem to be working with `tmux 3.4`

Open farzadmf opened this issue 1 year ago • 3 comments
trafficstars

Hi, I use this plugin a million times per day, but it seems like it doesn't work anymore after the recent tmux 3.4 update.

I narrowed down the issue to be when there are actually URLs in shell history.

What I mean is that:

  • If there are no URLs in the history, it properly runs and says "no URLs found"
  • If there are URLs, when I press the keybinding (I'm using the default prefix + u), nothing happens

Let me know if I can provide more information to help troubleshoot the issue

farzadmf avatar Feb 15 '24 19:02 farzadmf

Same here

tony-sol avatar Feb 16 '24 13:02 tony-sol

same here

carlz32 avatar Feb 16 '24 14:02 carlz32

@wfxr would you be able to take a look please?

farzadmf avatar Feb 17 '24 03:02 farzadmf

I found the issue/workaround, and I created my own fork. Since I'm not sure if that's a valid solution, I'm not gonna create a PR.

The split is now bigger, but personally I don't care as long as it works :/


EDIT: deleted my fork after the discussion below (chosing to set fzf options in the config)

farzadmf avatar Feb 18 '24 13:02 farzadmf

Hi @farzadmf It seems I cannot reproduce this on my mac with tmux v3.4. I suspect this problem may be related to the fzf. Can you check the version of your fzf? It's 0.46.1 on my machine.

wfxr avatar Feb 19 '24 02:02 wfxr

Hey @wfxr , thanks for you reply. Seems like to be the same version for me (0.46.1 (brew) on my Mac).

The weird thing is that if I run the fzf-tmux ... command directly in the temrinal, it displays fzf window (BUT, seems like it's ignoring the -d 35% option and showing it full-screen, so that might be something)

farzadmf avatar Feb 19 '24 02:02 farzadmf

@farzadmf thanks for your quick reply! I forgot that I had overridden the fzf-url-fzf-options:

set -g @fzf-url-fzf-options '-w 100% -h 50% --multi -0 --no-preview'

I can reproduce the problem after commented the above line in tmux.conf. And removing -d 35% also works for me.

wfxr avatar Feb 19 '24 02:02 wfxr

Oh cool, that setting seems to be very useful (more useful than the default bottom split that doesn't seem to be working anymore), so I'm gonna use that.

Do you know why it doesn't work with -d 35%?

farzadmf avatar Feb 19 '24 02:02 farzadmf

Do you know why it doesn't work with -d 35%?

I also don't know why it doesn't work. Maybe it's related to this issue?

wfxr avatar Feb 19 '24 02:02 wfxr

I'm going to replace the default settings with the following to workaround this problem, what do you think? @farzadmf @Tony-Sol @Carl-ZLJ

-w 100% -h 50% --multi -0 --no-preview

wfxr avatar Feb 19 '24 02:02 wfxr

Sounds good to me; as I mentioned, it's much better than the bottom split that I've been using. Glad that the issue happened for me to learn about this 😛

farzadmf avatar Feb 19 '24 02:02 farzadmf

Merged. You can update and have a try.

wfxr avatar Feb 19 '24 03:02 wfxr

Works for me; gonna close the issue as the original issue I had is resolved; thank you @wfxr for looking into it.

I have a question though: seems like if I set the option in my config using set -g @fzf-url-fzf-options '...', I get a pop-up window showing the URLs, but if I don't (and use the default), I get a split.

I personally prefer the pop-up, so I'm keeping the option in my config, but it's confusing for me as the option value is the same, but giving different results 🤔 Does it make sense? I'm probably missing something!

farzadmf avatar Feb 19 '24 03:02 farzadmf

I have a question though: seems like if I set the option in my config using set -g @fzf-url-fzf-options '...', I get a pop-up window showing the URLs, but if I don't (and use the default), I get a split.

Weird, I always see the pop-up window regardless of whether setting it explicitly. You can go to the plugin directory to check whether it has been updated to the latest commit.

wfxr avatar Feb 19 '24 03:02 wfxr

Well, my bad, sorry 🤦 ; I had changes when I was testing to figure out the issue, and it couldn't pull the changes, so all good now

farzadmf avatar Feb 19 '24 03:02 farzadmf