mirror of
https://github.com/walles/moar.git
synced 2024-11-22 03:14:56 +03:00
Mouse copying in VSCode and IntelliJ
Selecting text now works by default with these terminals.
This commit is contained in:
parent
52cf51f35e
commit
f1e886624e
2
MOUSE.md
2
MOUSE.md
@ -8,7 +8,7 @@ Most terminals support this capability, see [Selection workarounds for `scroll`
|
||||
- `select` makes `moar` not process mouse events. This makes selecting and copying text work, but scrolling might not be possible, depending on your terminal and its configuration.
|
||||
- `auto` uses `select` on terminals where we know it won't break scrolling, and
|
||||
`scroll` on all others. [The white list lives in the
|
||||
`mouseTrackingRecommended()` function in
|
||||
`terminalHasArrowKeysEmulation()` function in
|
||||
`screen.go`](https://github.com/walles/moar/blob/master/twin/screen.go).
|
||||
|
||||
The reason these tradeoffs exist is that if `moar` requests mouse events from the terminal,
|
||||
|
@ -291,6 +291,16 @@ func terminalHasArrowKeysEmulation() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// VSCode 1.89.0, tested on macOS 14.4, May 6th, 2024
|
||||
if os.Getenv("TERM_PROGRAM") == "vscode" {
|
||||
return true
|
||||
}
|
||||
|
||||
// IntelliJ IDEA CE 2023.2.2, tested on macOS 14.4, May 6th, 2024
|
||||
if os.Getenv("TERM_PROGRAM") == "JetBrains-JediTerm" {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user