Skyler Hawthorne
0e038fb80c
make clipboard message debug
2 years ago
gavynriebau
cce19713fb
Fix for lost clipboard contents ( #5424 ) ( #5426 )
...
* Fix for lost clipboard contents (#5424 )
* PR feedback: Call "setsid" for all unix systems
* PR Feedback: Only install libc for unix targets
2 years ago
Jonathan LEI
d3f670c0e2
Use OSC 52 for tmux copy ( #5027 )
2 years ago
Charlie Groves
1bed2f3043
Use OSC 52 as a fallback for setting the system clipboard ( #3220 )
...
This adds a simple base64 implementation to keep us from adding a crate for one function. It's
mostly based on
a675443d32/src/engine/naive.rs (L42)
2 years ago
Skyler Hawthorne
6a0b450f55
Fix multi byte auto pairs ( #4024 )
...
* Fix test::print for Unicode
The print function was not generating correct translations when
the input has Unicode (non-ASCII) in it. This is due to its use of
String::len, which gives the length in bytes, not chars.
* Fix multi-code point auto pairs
The current code for auto pairs is counting offsets by summing the
length of the open and closing chars with char::len_utf8. Unfortunately,
this gives back bytes, and the offset needs to be in chars.
Additionally, it was discovered that there was a preexisting bug where
the selection was not computed correctly in the case that the cursor
was:
1. a single grapheme in width
2. this grapheme was more than one char
3. the direction of the cursor is backwards
4. a secondary range
In this case, the offset was not being added into the anchor. This was
fixed.
* migrate auto pairs tests to integration
* review comments
2 years ago
Blaž Hrastnik
d993c6349b
One more windows fix...
2 years ago
Blaž Hrastnik
e863f6fe27
Fix compilation on windows
2 years ago
Blaž Hrastnik
cb7615e0ed
Make external terminal provider configurable
...
Fixes #1699
2 years ago
Amit Beka
fe3a9a868e
clipboard: add logging and healthcheck ( #3271 )
...
* add logging to clipboard setup
* healthcheck: add clipboard provider name
Co-authored-by: amitbeka <--->
2 years ago
Kirawi
77ff8d3550
cfg-gate unused functions on macos & windows ( #2332 )
3 years ago
Blaž Hrastnik
ade4cbffaa
Add a nop clipboard provider for wasm
3 years ago
جاد
a9635659f7
Reintroduce win32yank as a clipboard provider on Linux for WSL2 + Windows 10 ( #1912 )
...
* feat(clipboard): reintroduce win32yank for wsl2 linux
* refactor(clipboard): adjust win32yank position to not interrupt wayland/x11
Co-authored-by: jiqb <gthbji@ml1.net>
3 years ago
Blaž Hrastnik
511f37c736
clipboard: fix import on macOS
3 years ago
Blaž Hrastnik
8611c5b84e
Refactor clipboard to make it easier to feature gate std::process
3 years ago
Blaž Hrastnik
adf97e088e
Simplify get_clipboard_provider by defining one per host
3 years ago
Kirawi
0cb5e0b2ca
log syntax highlighting init errors ( #895 )
3 years ago
Blaž Hrastnik
6dd7dc4eb2
fix: xsel copy should not freeze the editor
...
If using --nodetach, xsel would end up continually running in the
foreground, so the command execution would never finish.
Fixes #630
3 years ago
Shafkath Shuhan
b63afbe74c
fix warnings
3 years ago
Dmitry Sharshakov
7d51805e94
Support primary clipboard ( #548 )
...
* clipboard-none: add in-memory fallback buffer
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* view: add Wayland primary clipboard
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* Format
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* helix-term: copy to primary selection after mouse move stops
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* helix-term: don't update primary selection if it is a single character
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* helix-term: discard result of setting primary selection
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* helix-term: add commands for interaction with primary clipboard
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* editor: implement primary selection copy/paste using commands
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* clipboard: support xsel for primary selection
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* clipboard: support xclip for primary selection
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* helix-term: multiple cursor support for middle click paste
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* rename primary selection to primary clipboard in scope of PR
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* helix-term: make middle click paste optional
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* Format
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* Update helix-term/src/ui/editor.rs
* fix formatting
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* config: correct defaults if terminal prop is not set
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* refactor: merge clipboard and primary selection implementations
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* Tidy up code
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* view: remove names for different clipboard/selection providers
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* Update helix-view/src/clipboard.rs
Co-authored-by: Gokul Soumya <gokulps15@gmail.com>
* helix-view: tidy macros
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* helix-term: refactor paste-replace commands
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* helix-term: use new config for middle-click-paste
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* clipboard: remove memory fallback for command and windows providers
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* clipboard-win: fix build
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* clipboard: return empty string when primary clipboard is missing
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* clipboard: fix errors in Windows build
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
Co-authored-by: Gokul Soumya <gokulps15@gmail.com>
3 years ago
Kirawi
acaf22d005
Added native Windows clipboard support ( #373 )
...
* Added native Windows clipboard support
* make conditional
wip
better conditional
wip
wip
wip
wip
make conditional
3 years ago
Blaž Hrastnik
994ff4b269
Don't run wl-copy with --foreground
...
It stalls the hx process
3 years ago
Benoît CORTIER
a2b8cfca34
Add system clipboard yank and paste commands
...
This commit adds six new commands to interact with system clipboard:
- clipboard-yank
- clipboard-yank-join
- clipboard-paste-after
- clipboard-paste-before
- clipboard-paste-replace
- show-clipboard-provider
System clipboard provider is detected by checking a few environment
variables and executables. Currently only built-in detection is
supported.
`clipboard-yank` will only yank the "main" selection, which is currently the first
one. This will need to be revisited later.
Closes https://github.com/helix-editor/helix/issues/76
3 years ago