NHDaly / tmux-better-mouse-mode

A tmux plugin to better manage and configure the mouse.
MIT License
916 stars 27 forks source link

scrolling mousewheel gives error #7

Closed TxHawks closed 8 years ago

TxHawks commented 8 years ago

After installing the plugin and reloading the conf file, I get the following when scrolling the mouse: Usage: copy-mode [-Mu] [-t target-pane]

Mouse-related options in config file:

set -g mouse-utf8 on 
set -g mouse on      
corv89 commented 8 years ago

Can you check that you've got tmux 2.1 by running tmux -V?

tmux 2.1 should support copy-mode -e

TxHawks commented 8 years ago

I'm using 2.1

On Thu, Jan 21, 2016, 17:26 corv89 notifications@github.com wrote:

Can you check that you've got tmux 2.1 by running tmux -V?

tmux 2.1 should support copy-mode -e

— Reply to this email directly or view it on GitHub https://github.com/NHDaly/tmux-scroll-copy-mode/issues/7#issuecomment-173605440 .

corv89 commented 8 years ago

What happens when you open the tmux command prompt (Ctrl-b + : ) and run copy-mode -e?

TxHawks commented 8 years ago

Same message as above

On Thu, Jan 21, 2016, 19:18 corv89 notifications@github.com wrote:

What happens when you open the tmux command prompt (Ctrl-b + : ) and run copy-mode -e?

— Reply to this email directly or view it on GitHub https://github.com/NHDaly/tmux-scroll-copy-mode/issues/7#issuecomment-173642374 .

NHDaly commented 8 years ago

Hmm, that's definitely weird. In that case, it doesn't sound like this plugin is to blame... Have you asked on the tmux repo?

NHDaly commented 8 years ago

Was this ever resolved?

TxHawks commented 8 years ago

@NHDaly -

Not yet. I need to try and ask at the tmux repo. Will update if I manage to figure it out.

NHDaly commented 8 years ago

Cool. I think it would also help, actually if you could paste here what your WheelUpPane and WheelDownPane bindings are by running tmux list-keys -T root. For an example, mine look like this:

$ tmux list-keys -T root
...
bind-key -T root WheelUpPane      if-shell -F -t = #{mouse_any_flag} "send-keys -M" "if-shell -Ft= '#{alternate_on}' 'send-keys -M' "if -Ft= '#{pane_in_mode}' ' send-keys -M ; send-keys -M ; ' ' copy-mode -e -t='""
bind-key -T root WheelDownPane    if-shell -F -t = #{mouse_any_flag} "send-keys -M" "if-shell -Ft= '#{alternate_on}' 'send-keys -M' "if -Ft= '#{pane_in_mode}' ' send-keys -M ; send-keys -M ; ' ' send-keys -M ; send-keys -M ; '""

Thanks! :)

TxHawks commented 8 years ago

The output of tmux list-keys -T root is:

bind-key -T root MouseDown1Pane   select-pane -t = ; send-keys -M
bind-key -T root MouseDown1Status select-window -t =
bind-key -T root MouseDrag1Pane   if-shell -F -t = #{mouse_any_flag} "if -Ft= "#{pane_in_mode}" "copy-mode -M" "send-keys -M"" "copy-mode -M"
bind-key -T root MouseDrag1Border resize-pane -M
bind-key -T root WheelUpPane      if-shell -F -t = #{mouse_any_flag} "send-keys -M" "if-shell -Ft= '#{alternate_on}' 'send-keys -M' "if -Ft= '#{pane_in_mode}' ' send-keys -M ; send-keys -M ; send-keys -M ; ' ' copy-mode -e -t='""
bind-key -T root WheelDownPane    if-shell -F -t = #{mouse_any_flag} "send-keys -M" "if-shell -Ft= '#{alternate_on}' 'send-keys -M' "if -Ft= '#{pane_in_mode}' ' send-keys -M ; send-keys -M ; send-keys -M ; ' ' send-keys -M ; send-keys -M ; send-keys -M ; '""

There seem to be two extra send-keys -Ms in WheelUpPane and WheelDownPane, compared with yours.

Thanks!

NHDaly commented 8 years ago

There seem to be two extra send-keys -Ms in WheelUpPane and WheelDownPane, compared with yours.

Oh, yeah, that's because I've set @scroll-speed-num-lines-per-scroll to 2 instead of the default, 3. Sorry that's confusing.

Yep, plugin looks okay, so it's gotta be something with your tmux. I'm gonna close this Issue for now, but feel free to open it again if you're stuck in the future. Good luck! :)