Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration script / jump to marker (ScrollMarkUp/Down) broke #658

Closed
whisperity opened this issue Apr 28, 2022 · 1 comment
Closed

Integration script / jump to marker (ScrollMarkUp/Down) broke #658

whisperity opened this issue Apr 28, 2022 · 1 comment
Labels
bug Something isn't working frontend Contour Terminal Emulator (GUI frontend) platform: linux topics that directly address Linux platform (any distro)

Comments

@whisperity
Copy link
Member

Contour Terminal version

0.3.1.3196

Installer source

Github: CI actions

Operating System

Ubuntu 18.04.6

Architecture

x86-64

Other Software

zsh 5.4.2 (x86_64-ubuntu-linux-gnu)
romkatv/powerlevel10k@c9bc2f5

Steps to reproduce

  1. Have a keybind for ScrollMarkUp/ScrollMarkDown in the config.
  2. Start a shell.
  3. seq 1 100, seq 101 200
  4. Press the keybinds

Maybe(?) reproducible in pure Bash if a slightly modified version of the integration command is executed manually:

echo -en '\e[>M' > $(tty)

Expected Behavior

The scrolling to the prompts work.

Actual Behavior

It does not.

Additional notes

history.limit: 16384 but this should accommodate approx. 205 lines

Contour 0.3.0.3089, the previous version I was using, did not have this error.

2022-04-04 09:47:02 configure contour:amd64 0.3.0.3089 0.3.0.3089

The issue does not seem to be with the keybind parsing logic, because setting different keybinds (e.g. Shift K), removing mode: "~Alt", etc. still fails to fix this.

Debug log from prompt drawing after executing seq 1 50

[2022-04-28 14:55:19.704645] [vt.trace] text: ""
[2022-04-28 14:55:19.704647] [vt.trace] text: " "
[2022-04-28 14:55:19.704651] [vt.trace] Handle VT sequence: CSI m
[2022-04-28 14:55:19.704655] [vt.trace] Handle VT sequence: CSI 30 m
[2022-04-28 14:55:19.704658] [vt.trace] Handle VT sequence: CSI 47 m
[2022-04-28 14:55:19.704662] [vt.trace] Handle VT sequence: CSI 47 m
[2022-04-28 14:55:19.704665] [vt.trace] Handle VT sequence: CSI 30 m
[2022-04-28 14:55:19.704667] [vt.trace] text: " "
[2022-04-28 14:55:19.704671] [vt.trace] Handle VT sequence: CSI 49 m
[2022-04-28 14:55:19.704674] [vt.trace] Handle VT sequence: CSI 37 m
[2022-04-28 14:55:19.704676] [vt.trace] text: ""
[2022-04-28 14:55:19.704680] [vt.trace] Handle VT sequence: CSI m
[2022-04-28 14:55:19.704683] [vt.trace] Handle VT sequence: CSI 37 m
[2022-04-28 14:55:19.704687] [vt.trace] Handle VT sequence: CSI 47 m
[2022-04-28 14:55:19.704690] [vt.trace] Handle VT sequence: CSI 30 m
[2022-04-28 14:55:19.704693] [vt.trace] Handle VT sequence: CSI m
[2022-04-28 14:55:19.704696] [vt.trace] Handle VT sequence: CSI 30 m
[2022-04-28 14:55:19.704699] [vt.trace] Handle VT sequence: CSI 47 m
[2022-04-28 14:55:19.704703] [vt.trace] Handle VT sequence: CSI 49 m
[2022-04-28 14:55:19.704706] [vt.trace] Handle VT sequence: CSI 39 m
[2022-04-28 14:55:19.704709] [vt.trace] C0 0x0D
[2022-04-28 14:55:19.704711] [vt.trace] C0 0x0A
[2022-04-28 14:55:19.704713] [vt.trace] text: "╰"
[2022-04-28 14:55:19.704719] [vt.trace] text: "─"
[2022-04-28 14:55:19.704723] [vt.trace] text: " "
[2022-04-28 14:55:19.704727] [vt.trace] Handle VT sequence: CSI m
[2022-04-28 14:55:19.704731] [vt.trace] Handle VT sequence: CSI 49 m
[2022-04-28 14:55:19.704734] [vt.trace] Handle VT sequence: CSI m
[2022-04-28 14:55:19.704738] [vt.trace] Handle VT sequence: CSI 49 m
[2022-04-28 14:55:19.704742] [vt.trace] Handle VT sequence: CSI 39 m
[2022-04-28 14:55:19.704745] [vt.trace] Handle VT sequence: CSI K
[2022-04-28 14:55:19.704814] [pty.input] master received: "\e[?1h"
[2022-04-28 14:55:19.704837] [vt.trace] Handle VT sequence: CSI ? 1 h
[2022-04-28 14:55:19.704850] [vt.input] set cursor keys mode: Application
[2022-04-28 14:55:19.705752] [font.textshaping] Shaping using font key: 0, text: "1.85"
[2022-04-28 14:55:19.705765] [font.textshaping] Shaping codepoints: 0:U+31 1:U+2e 2:U+38 3:U+35
        Using font: key=0, path="/usr/local/share/fonts/j/JetBrains_Mono_Regular_Nerd_Font_Complete.ttf"
[2022-04-28 14:55:19.705818] [vt.rasterizer] Shaped codepoints (text/Text): 1.85 (U+0031/0 U+002E/1 U+0038/2 U+0035/3)
        with metrics: (21+0+0|9+0) (18+0+0|9+0) (28+0+0|9+0) (25+0+0|9+0)
[2022-04-28 14:55:19.705838] [font.textshaping] Shaping using font key: 0, text: "14:55:19"
[2022-04-28 14:55:19.705845] [font.textshaping] Shaping codepoints: 0:U+31 1:U+34 2:U+3a 3:U+35 4:U+35 5:U+3a 6:U+31 7:U+39
        Using font: key=0, path="/usr/local/share/fonts/j/JetBrains_Mono_Regular_Nerd_Font_Complete.ttf"
[2022-04-28 14:55:19.705883] [vt.rasterizer] Shaped codepoints (text/Text): 14:55:19 (U+0031/0 U+0034/1 U+003A/2 U+0035/3 U+0035/4 U+003A/5 U+0031/6 U+0039/7)
        with metrics: (21+0+0|9+0) (24+0+0|9+0) (30+0+0|9+0) (25+0+0|9+0) (25+0+0|9+0) (30+0+0|9+0) (21+0+0|9+0) (29+0+0|9+0)
[2022-04-28 14:55:19.706047] [pty.input] master received: "\e[?2004h"
[2022-04-28 14:55:19.706070] [vt.trace] Handle VT sequence: CSI ? 2004 h
[2022-04-28 14:55:21.428904] [gui.input] Alt,Shift 75
[2022-04-28 14:55:21.428954] [gui.session] executeAction: ScrollMarkUp
[2022-04-28 14:55:22.253048] [gui.input] Alt,Shift 74
[2022-04-28 14:55:22.253099] [gui.session] executeAction: ScrollMarkDown

It seems the keybind is received and acted upon.

Debug log after executing an echo to redraw the prompt

[2022-04-28 14:57:32.488424] [pty.input] master received: "\e]2;echo\007"
[2022-04-28 14:57:32.488574] [vt.trace] Handle VT sequence: OSC 2 echo
[2022-04-28 14:57:32.489602] [pty.input] master received: "\e[?2027h"
[2022-04-28 14:57:32.490133] [vt.trace] Handle VT sequence: CSI ? 2027 h
[2022-04-28 14:57:32.490474] [pty.input] master received: "\r\n"
[2022-04-28 14:57:32.490539] [vt.trace] C0 0x0D
[2022-04-28 14:57:32.490553] [vt.trace] C0 0x0A
[2022-04-28 14:57:32.491008] [pty.input] master received: "\e[1m\e[7m%\e[27m\e[1m\e[0m                                                                               \r \r"
[2022-04-28 14:57:32.491154] [vt.trace] Handle VT sequence: CSI 1 m
[2022-04-28 14:57:32.491193] [vt.trace] Handle VT sequence: CSI 7 m
[2022-04-28 14:57:32.491224] [vt.trace] Handle VT sequence: CSI 27 m
[2022-04-28 14:57:32.491245] [vt.trace] Handle VT sequence: CSI 1 m
[2022-04-28 14:57:32.491265] [vt.trace] Handle VT sequence: CSI m

[...]

[2022-04-28 14:57:32.492291] [vt.trace] C0 0x0D
[2022-04-28 14:57:32.492306] [vt.trace] text: " "
[2022-04-28 14:57:32.492320] [vt.trace] C0 0x0D
[2022-04-28 14:57:32.492368] [pty.input] master received: "\e]2;~\007"
[2022-04-28 14:57:32.492808] [vt.trace] Handle VT sequence: OSC 2 ~
[2022-04-28 14:57:32.543846] [pty.input] master received: "\e[?2027l\e[>M"
[2022-04-28 14:57:32.543881] [vt.trace] Handle VT sequence: CSI ? 2027 l
[2022-04-28 14:57:32.543889] [vt.trace] Handle VT sequence: CSI > M
[2022-04-28 14:57:32.545545] [pty.input] master received: "\e]7;/home/whisperity\e\\"
[2022-04-28 14:57:32.545588] [vt.trace] Handle VT sequence: OSC 7 /home/whisperity
[2022-04-28 14:57:32.577589] [pty.input] master received: "\r\e[0m\e[27m\e[24m\e[J\e[0m\e[49m\e[39m\r\n\e[A\xe2\x95\xad\xe2\x94\x80\e[0m\e[49m\e[30m\xee\x82\xb2\e[0m\e[30m\e[40m\e[32m \xe2\x9c\x94\e[0m\e[32m\e[40m\e[40m\e[32m \e[0m\e[32m\e[40m\e[48;5;153m\e[30m\e[0m\e[30m\e[48;5;153m\e[48;5;153m\e[30m \xef\x80\x95  ~\e[0m\e[30m\e[48;5;153m\e[48;5;153m\e[30m \e[0m\e[30m\e[48;5;153m\e[49m\e[38;5;153m\xee\x82\xb4\e[0m\e[38;5;153m\e[49m\e[39m \e[0m\e[49m\e[39m                                         \e[0m\e[49m\e[32m\xee\x82\xb6\e[0m\e[32m\e[42m\e[30m 1.56\e[0m\e[30m\e[42m\e[42m\e[30m \xef\x82\x80 \e[0m\e[30m\e[42m\e[42m\e[30m \e[0m\e[30m\e[42m\e[42m\e[30m\e[37m\e[0m\e[37m\e[42m\e[47m\e[30m 14:57:32\e[0m\e[30m\e[47m\e[47m\e[30m \xef\x80\x97 \e[0m\e[30m\e[47m\e[47m\e[30m \e[49m\e[37m\xee\x82\xb0\e[0m\e[37m\e[47m\e[30m\e[0m\e[30m\e[47m\e[49m\e[39m\r\n\xe2\x95\xb0\xe2\x94\x80 \e[0m\e[49m\e[0m\e[49m\e[39m"
[2022-04-28 14:57:32.577607] [vt.trace] C0 0x0D
[2022-04-28 14:57:32.577621] [vt.trace] Handle VT sequence: CSI m
[2022-04-28 14:57:32.577629] [vt.trace] Handle VT sequence: CSI 27 m
[2022-04-28 14:57:32.577632] [vt.trace] Handle VT sequence: CSI 24 m
[2022-04-28 14:57:32.577636] [vt.trace] Handle VT sequence: CSI J
[2022-04-28 14:57:32.577643] [vt.trace] Handle VT sequence: CSI m
[2022-04-28 14:57:32.577647] [vt.trace] Handle VT sequence: CSI 49 m
[2022-04-28 14:57:32.577650] [vt.trace] Handle VT sequence: CSI 39 m
[2022-04-28 14:57:32.577653] [vt.trace] C0 0x0D
[2022-04-28 14:57:32.577655] [vt.trace] C0 0x0A
[2022-04-28 14:57:32.577659] [vt.trace] Handle VT sequence: CSI A
[2022-04-28 14:57:32.577662] [vt.trace] text: "╭"
[2022-04-28 14:57:32.577678] [vt.trace] text: "─"
[2022-04-28 14:57:32.577692] [vt.trace] Handle VT sequence: CSI m
[2022-04-28 14:57:32.577700] [vt.trace] Handle VT sequence: CSI 49 m
[2022-04-28 14:57:32.577711] [vt.trace] Handle VT sequence: CSI 30 m
[2022-04-28 14:57:32.577715] [vt.trace] text: ""
[2022-04-28 14:57:32.577724] [vt.trace] Handle VT sequence: CSI m
[2022-04-28 14:57:32.577731] [vt.trace] Handle VT sequence: CSI 30 m
[2022-04-28 14:57:32.577742] [vt.trace] Handle VT sequence: CSI 40 m
[2022-04-28 14:57:32.577749] [vt.trace] Handle VT sequence: CSI 32 m
[2022-04-28 14:57:32.577754] [vt.trace] text: " "
[2022-04-28 14:57:32.577761] [vt.trace] text: "✔"
~~~
@whisperity whisperity added bug Something isn't working frontend Contour Terminal Emulator (GUI frontend) platform: linux topics that directly address Linux platform (any distro) labels Apr 28, 2022
@christianparpart
Copy link
Member

Fixes in 72becd9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working frontend Contour Terminal Emulator (GUI frontend) platform: linux topics that directly address Linux platform (any distro)
Projects
None yet
Development

No branches or pull requests

2 participants