Commit graph

27 commits

Author SHA1 Message Date
Christian Höltje e012849621 copy_line: simpler code for tmux 2.4 2017-05-05 22:32:53 -04:00
Christian Höltje 075f56e365 more lint 2017-05-05 22:16:07 -04:00
Christian Höltje ab9218c987 helpers: more lint 2017-05-05 21:40:52 -04:00
Christian Höltje 6396642871 lint: Declare and assign separately
…to avoid masking return values
2017-05-05 00:29:59 -04:00
Christian Höltje f30926f150 normalized indentation in all scripts 2017-05-05 00:25:22 -04:00
Christian Höltje bd8c664085 Merge pull request #79 from lukewang1024/feature/WSL-support
Use clip.exe if exists for copying to Windows clipboard in WSL.
2017-05-04 11:44:15 -04:00
Edgar HIPP adda216aa0 Support tmux 2.4 for copy_line 2017-04-29 17:05:43 +02:00
Christian Höltje 896ecf9074 Added tmux-is-at-least method for version checking 2017-04-21 15:15:34 -04:00
Luke Wang fe10415ba0 Use clip.exe if exists for copying to Windows clipboard in WSL. 2017-03-28 19:52:51 +08:00
Bruno Sutic dc9853942b
Better use of constants 2015-10-12 14:25:54 +02:00
Bruno Sutic 047e71f9fb
Copy pane current dir feature 2015-10-12 13:54:27 +02:00
HIPP Edgar (PRESTA EXT) a21e5a027c Add support for custom copy command 2015-09-22 09:20:57 +02:00
Xavier Naveira 61f5da39e9 Changed vi mode commands for beginning and end of line by Bruno's suggestion 2015-06-17 10:42:33 +02:00
Xavier Naveira 4d521c1363 Added shell vi mode compatibility 2015-06-17 10:04:02 +02:00
Bruno Sutic 04ce0b9451 Merge pull request #26 from ctjhoa/master
Add xsel support
2015-01-29 16:30:07 +01:00
Bruno Sutic 0d212c2c3d
Change "put selection" key binding to Y
Previously this was `Ctrl-y` but that overrode the default vi-copy mode
key binding.

Closes #27
2014-12-06 23:40:37 +01:00
Camille TJHOA fbca231be2 Add xsel support 2014-11-21 14:30:07 +01:00
Shawn Siefkas 0b323a16df Adding @yank_selection option to override xclip selection
Closes #18
2014-08-04 22:28:50 +02:00
Bruno Sutic ea13a18a5d Bugfix: copy line binding never yanks newlines
This addresses a tmux/bash issue that occurs for commands with multiple
lines. When 'C-e' is pressed in a command, this confuses tmux so
newlines are yanked in copy-mode.

When a user wants to line-yank multiple-line command he is better off
when newlines aren't yanked.
This commit reliably enables this.

Fixes #13
2014-06-29 14:13:27 +02:00
Bruno Sutic 2fa5010bf4 Code cleanup
Removed lines weren't really used.
2014-06-29 12:18:23 +02:00
Bruno Sutic bed68528d9 Bugfix: line yank doesn't work when in last pane line
When the current command line is the last/bottom line in the scrollback
buffer, then jumping to the bottom of the buffer:
- stays in the current line
- goes to the start of current line

This is, of course, not desired bc we get the wrong result.

The fix is to just 'down' movement in copy mode. The down movement
preserves cursor column.

Fixes #11.
2014-06-28 00:50:35 +02:00
Bruno Sutic 8a0c06e1fe Adds wait time for 'yank line' when running remote shell
If 'yank line' is tried when running in a remote shell (ssh) with
latency, the result will not be good.
I consistently yanked only the *last character* in the command.
This is due to latency: yank line feature works faster than the cursor
is moved in the remote shell.

To fix this issue, if remote shell is detected (ssh or mosh) wait time
is added to compensate for network latency.
Wait time of '0.2s' seemed to give good results, but at the end, wait of
'0.4s' is set. This should be more robust and allow for even greater
latency (I only wonder how could anyone work with that).
2014-06-27 12:42:33 +02:00
Bruno Sutic 7cbde7b5dd Line copy feature now works accross multiple lines 2014-06-25 15:35:48 +02:00
Bruno Sutic 22c55eaeda Make sure the line copy feature works with vi and emacs copy mode 2014-06-25 15:16:05 +02:00
Bruno Sutic 4a15a81783 Add a feature for copying current command line to clipboard 2014-06-25 15:11:27 +02:00
Bruno Sutic 94bc2628a8 Extract key-related functions to a helper 2014-06-25 13:33:23 +02:00
Bruno Sutic f0b0dc9d8e Add error handling 2014-06-24 14:40:50 +02:00