1
1
mirror of https://github.com/wez/wezterm.git synced 2024-08-16 17:50:28 +03:00

Add config option for mouse cursor when grabbing

This commit is contained in:
zhiayang 2023-04-21 22:01:35 +08:00
parent d0e9a03440
commit 4917c039e7
No known key found for this signature in database
GPG Key ID: 5E2F30AD6F08571F
3 changed files with 22 additions and 1 deletions

View File

@ -627,6 +627,12 @@ pub struct Config {
#[dynamic(default = "default_true")]
pub hide_mouse_cursor_when_typing: bool,
/// If true, the mouse cursor will be an arrow if
/// the application has captured the mouse.
/// This option is true by default.
#[dynamic(default = "default_true")]
pub use_arrow_mouse_cursor_when_mouse_reporting: bool,
/// If non-zero, specifies the period (in seconds) at which various
/// statistics are logged. Note that there is a minimum period of
/// 10 seconds.

View File

@ -0,0 +1,13 @@
# `use_arrow_mouse_cursor_when_mouse_reporting`
{{since('nightly')}}
If `true`, the mouse cursor will be overridden to be an arrow
when the application enables mouse reporting. Otherwise, it
will remain as the text cursor (an I-beam).
The default is `true`.
```lua
config.use_arrow_mouse_cursor_when_mouse_reporting = true
```

View File

@ -824,7 +824,9 @@ impl super::TermWindow {
// When hovering over a hyperlink, show an appropriate
// mouse cursor to give the cue that it is clickable
MouseCursor::Hand
} else if pane.is_mouse_grabbed() || outside_window {
} else if outside_window
|| (self.config.use_arrow_mouse_cursor_when_mouse_reporting && pane.is_mouse_grabbed())
{
MouseCursor::Arrow
} else {
MouseCursor::Text