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

Add yank on MouseDragEnd1Pane #109

Merged
merged 5 commits into from
Dec 4, 2018
Merged

Conversation

keidax
Copy link
Contributor

@keidax keidax commented May 28, 2018

This basically expands on some of the removed code from #104 so that:

  • dragging with the mouse will yank with the current settings
  • @yank_selection_mouse controls the selection on Linux, defaulting to PRIMARY
  • setting @yank_with_mouse to off will disable these changes

Copy link
Contributor

@docwhat docwhat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking the time to contribute back!

@@ -121,6 +135,7 @@ command_exists() {
}

clipboard_copy_command() {
local mouse="$1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change that to local mouse="${1:-false}" to preserve previous callers.


yank_with_mouse_default="on"
yank_with_mouse_option="@yank_with_mouse"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would appreciate it if you could add a description of these to the README.md.

@keidax
Copy link
Contributor Author

keidax commented Jun 8, 2018

@docwhat thanks for the feedback, I made the requested changes and updated mouse documentation.

@docwhat docwhat requested a review from bruno- June 11, 2018 16:36
@Kriechi
Copy link

Kriechi commented Aug 22, 2018

I would really love to see getting this merged - anything holding it up?

@gregflynn
Copy link

I just stumbled across this PR, I second the desire to get this merged and offer to rebase it to get it merged if @docwhat is still interested.

In the meantime, I have the following workaround to share:

bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X 'copy-pipe-and-cancel' 'xclip -selection clipboard'

The above binding was reverse engineered from what this PR does under the hood

@docwhat docwhat merged commit 74b0ff7 into tmux-plugins:master Dec 4, 2018
docwhat added a commit that referenced this pull request Dec 4, 2018
- Ran `shfmt` on shell code.
- Fixed ordering of `xclip` and `xsel`.

Issue #109
@docwhat
Copy link
Contributor

docwhat commented Dec 4, 2018

Thanks for reminding me. Merged.

@keidax keidax deleted the yank-with-mouse branch April 3, 2019 02:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants