Hyper does not handle bracketed paste mode correctly, inserts "random" characters on Windows
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 44.7k
- Forks
- 3.6k
- Avg merge
- 21m
- Merged PRs (30d)
- 1
Description
- Your Hyper.app version is 3.1.2. Please verify your using the latest Hyper.app version
- I have searched the issues of this repo and believe that this is not a duplicate
-
Any relevant information from devtools? (CMD+OPTION+I on macOS, CTRL+SHIFT+I elsewhere):
N/A -
Is the issue reproducible in vanilla Hyper.app?
Yes
Issue
I recently upgrade from fish shell 3.0.2-1 to 3.3.1 and started seeing strange behaviour in Hyper on Windows. In particular, the shell kept adding "random" l, h, and characters to the beginning and ends of lines. For example:
user@mainframe /m/c/U/User> echo banana | wcl # `l` was not part of input here
1 1 7h # `h` is not part of expected output
user@mainframe /m/c/U/User> echo banana | wc
l 1 1 7h # `l` and `h` are not part of expected output
At first I thought this was a bug in fish shell, which recently introduced bracketed paste mode, but it isn't reproducible in windows native console (i.e. wsl.exe).
I'm especially confused since I can't reproduce this in the xterm.js demo (which Hyper uses, and already supports this mode (see DECRST and DECSET) (PR)) and doesn't appear to be an issue on Mac or Linux.
There is this ancient issue about bracketed paste support in Hyper but as mentioned it looks to be working fine in Linux and Mac, just not Windows.
(Also, I haven't been able to reproduce in Powershell or cmd.exe)
Steps to reproduce
- Install Hyper 3.1.2 (or start in vanilla mode) on Windows
- Install fish shell 3.3.1 in WSL
- Create a new clean fish environment (i.e.
sh -c 'env HOME=$(mktemp -d) fish') - Run some commands (e.g.
echo banana | wcseems to reliably reproduce the issue, and demonstrate the issue's non-determinism)
- Hyper version: undefined "3.1.2"
- OS ARCH VERSION: win32 x64 10.0.19041
- Electron: 13.1.7 LANG: undefined
- SHELL: fish 3.3.1 TERM:
xterm-256colors(determined by Hyper / xterm.js)
.hyper.js contents
{
"updateChannel": "stable",
"fontSize": 12,
"fontFamily": "\"JetBrainsMono Nerd Font\", Menlo, \"DejaVu Sans Mono\", Consolas, \"Lucida Console\", monospace",
"fontWeight": "normal",
"fontWeightBold": "bold",
"lineHeight": 1,
"letterSpacing": 0,
"cursorColor": "rgba(248,28,229,0.8)",
"cursorAccentColor": "#000",
"cursorShape": "BLOCK",
"cursorBlink": false,
"foregroundColor": "#fff",
"backgroundColor": "#000",
"selectionColor": "rgba(248,28,229,0.3)",
"borderColor": "#333",
"css": "",
"termCSS": "",
"showHamburgerMenu": "",
"showWindowControls": "",
"padding": "12px 14px",
"colors": {
"black": "#000000",
"red": "#C51E14",
"green": "#1DC121",
"yellow": "#C7C329",
"blue": "#0A2FC4",
"magenta": "#C839C5",
"cyan": "#20C5C6",
"white": "#C7C7C7",
"lightBlack": "#686868",
"lightRed": "#FD6F6B",
"lightGreen": "#67F86F",
"lightYellow": "#FFFA72",
"lightBlue": "#6A76FB",
"lightMagenta": "#FD7CFC",
"lightCyan": "#68FDFE",
"lightWhite": "#FFFFFF"
},
"shell": "C:\\Windows\\System32\\wsl.exe",
"shellArgs": [],
"env": {},
"bell": "SOUND",
"copyOnSelect": false,
"defaultSSHApp": true,
"quickEdit": true,
"macOptionSelectionMode": "vertical",
"webGLRenderer": true
}
plugins
{
"plugins": [
"hyper-solarized-dark"
],
"localPlugins": []
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue in Hyper 3.1.2 on Windows with WSL fish 3.3.1, using the clean fish environment and commands described in the report. Compare Hyper's behavior with the xterm.js demo and Windows native console while tracing bracketed paste handling; done means commands no longer receive the stray l, h, or space characters.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- electron, javascript, typescript
- Domain
- cli, desktop, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100