wez / wezterm

A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
https://wezfurlong.org/wezterm/
Other
17.88k stars 801 forks source link

De-selection does not work under some circumstances #910

Closed zhou13 closed 3 years ago

zhou13 commented 3 years ago

Describe the bug

Canceling selection does not work under some circumstances.

Environment (please complete the following information):

To Reproduce

Steps to reproduce the behavior.

Method 1

  1. triple-click any line to select it;
  2. move the cursor to another line and click.

If you act fast so that the gap between 1 and 2 is small enough, the line selected in 1 won't be deselected.

Method 2

  1. press down the cursor and move the cursor to drag an area
  2. move the cursor to another line and click.

If you act fast so that the gap between 1 and 2 is small enough, wezterm will always select the area of 2 rather than deselected.

Configuration

return {
    colors = {
        foreground = "#F8F8F2",
        background = "#282A36",
        selection_bg = "#44475a",
        selection_fg = "#ffffff",
        ansi = {"#282A36", "#ff5555", "#50fa7b", "#f1fa8c", "#bd93f9", "#ff79c6", "#8be9fd", "#bfbfbf"},
        brights = {"#4d4d4d", "#ff6e67", "#5af78e", "#f4f99d", "#caa9fa", "#ff92d0", "#9aedfe", "#e6e6e6"},
    },
    check_for_updates = false,
    exit_behavior = "Close",
    font = wezterm.font_with_fallback({
        "Fantasque Sans Mono",
    }),
    font_size = font_size,
    force_reverse_video_cursor = true,
    freetype_interpreter_version = 35,
    freetype_render_target = "HorizontalLcd",
    hide_tab_bar_if_only_one_tab = true,
    scrollback_lines = 35000,
    term = "xterm-256color",
}

Expected behavior

wezterm should deselect the area in 1.

wez commented 3 years ago

How fast is fast enough for this to trigger?

zhou13 commented 3 years ago

According to my feeling it is about 100-400ms.

wez commented 3 years ago

is this still an issue for you? I think we identified some other mouse binding issues that I think were probably the cause of what you were seeing here; the interaction delay is small enough that I think you were driving up the "streak" count for click counting and not triggering the event you thought you were. I'm going to speculatively close this, but please reopen if there is something still to be run down.

zhou13 commented 3 years ago

@wez I tested this again on wezterm-nightly-bin-20210825.094007.0fc2fdd3-1. I still encounter the same problem.

valpackett commented 3 years ago

I just wanted to report something along those lines. I think the issue is that streaks are only interrupted by time or button change, but they really, really should be interrupted by significant movement.

github-actions[bot] commented 1 year ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.