wez / wezterm

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

ScrollToPrompt working inconsistently or not at all with multiplexer #2880

Open dramborleg opened 1 year ago

dramborleg commented 1 year ago

What Operating System(s) are you seeing this problem on?

Linux X11

Which Wayland compositor or X11 Window manager(s) are you using?

Gnome 3.36.8 (on Ubuntu 20.04)

WezTerm version

20221220-083007-eb8dfd32

Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

Yes, and I updated the version box above to show the version of the nightly that I tried

Describe the bug

Using ScrollToPrompt with OSC133 codes does not seem to work in unix domains, and sometimes doesn't work in local domains. There are two unexpected behaviors but it might be the same bug so I will include both scenarios, exact reproduction steps are below.

To Reproduce

Configuration

wezterm.lua

local wezterm = require 'wezterm'
local act = wezterm.action

return {
  default_prog = {'/usr/bin/zsh'},
  keys = {
    { key = 'UpArrow', mods = 'SHIFT', action = act.ScrollToPrompt(-1) },
    { key = 'DownArrow', mods = 'SHIFT', action = act.ScrollToPrompt(1) },
  },
  unix_domains = {
      {name = 'test_domain'},
  },
}

.zshrc

source ~/.config/wezterm/wezterm.sh

The above wezterm.sh is unmodified version of https://github.com/wez/wezterm/blob/main/assets/shell-integration/wezterm.sh

Expected Behavior

No response

Logs

No response

Anything else?

No response

expnn commented 1 year ago

I confirm that ScrollToPrompt does not work in mux domains, but it works in a local domain.

Commands to reproduce:

My config:

The ./wezterm.lua file:

local wezterm = require("wezterm")
local act = wezterm.action

local config = wezterm.config_builder()

config.keys = {
    -- Scroll to Prompt, currently not working, must be a bug in wezterm.
    { key = 'UpArrow', mods = 'SHIFT', action = act.ScrollToPrompt(-1) },
    { key = 'DownArrow', mods = 'SHIFT', action = act.ScrollToPrompt(1) },
}

return config

Tested wezterm version

20230408-112425-69ae8472

wez commented 1 year ago

Likely the same or similar underlying cause as: