Issue metadata
Sign in to add a comment
|
hterm: Copy pasting long lines adds a new line |
||||||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.108 Safari/537.36 Steps to reproduce the problem: 1. Run some command which outputs a line longer than width of terminal (so one logical line spans multiple physical lines). Eg. ==== Some command with a lots[GOES TO NEXT LINE DUE TO TERM WIDTH] and lots of flags ==== 2. Use mouse to try to copy-paste the entire line including the newline at the end of the command (dont think newline at end of command matters) What is the expected behavior? I can execute the command as expected. What went wrong? A new line gets inserted when line length overflow term width. So instead what gets executed is $ Some command with a lots $ and lots of flags which depending on the actual command and flags of course fails. WebStore page: https://chrome.google.com/webstore/detail/secure-shell/pnhechapfaindjhompbnflcldabbghjo Did this work before? N/A Chrome version: 63.0.3239.108 Channel: n/a OS Version: Flash Version: Shockwave Flash 28.0 r0 It is an annoyance and means for long command lines I need to copy-paste each section carefully to not pick up the newline.
,
Jan 5 2018
Find some linux host you can successfully ssh to. Test1 $ seq -w -s'-' 1 100 | cat -vet 001-002-003-004-005-006-007-008-009-010-011-012-013-014-015-016-017-018-019-020-021-022-023-024-025-026-027-028-029-030-031-032-033-034-035-036-037-038-039-040-041-042-043-044-045-046-047-048-049-050-051-052-053-054-055-056-057-058-059-060-061-062-063-064-065-066-067-068-069-070-071-072-073-074-075-076-077-078-079-080-081-082-083-084-085-086-087-088-089-090-091-092-093-094-095-096-097-098-099-100$ Note the lone '$' at the end. Test2 $ echo '001-002-003-004-005-006-007-008-009-010-011-012-013-014-015-016-017-018-019-020-021-022-023-024-025-026-027-028-029-030-031-032-033-034-035-036-037-038-039-040-041-042-043-044-045-046-047-048-049-050-051-052-053-054-055-056-057-058-059-060-061-062-063-064-065-066-067-068-069-070-071-072-073-074-075-076-077-078-079-080-081-082-083-084-085-086-087-088-089-090-091-092-093-094-095-096-097-098-099-100' | cat -vet has the exact same output. Test3 Now * type in [echo '] * use your mouse to copy-paste the complete output of the first or second command without including the trailing $ * type in [' | cat -vet] (to close the single quote) and hit enter Expected output is the same as the first two. But observed output is ==== 001-002-003-004-005-006-007-008-009-010-011-012-013-014-015-016-017-018-019-020-021-022-023-024-025-026-027-028-029-030-031-032-033-034-035-036$ -037-038-039-040-041-042-043-044-045-046-047-048-049-050-051-052-053-054-055-056-057-058-059-060-061-062-063-064-065-066-067-068-069-070-071-072-073-074-075-076-077-078-079-08 $ 0-081-082-083-084-085-086-087-088-089-090-091-092-093-094-095-096-097-098-099-100$ ==== NOTE the extra $ signs (which represent newline chars) after 36 and in the middle of 80. The actual location of extra $ and number of extra $ (depends on your terminal width) doesn't matter, the fact that we have extra $ signs is the issue.
,
Jan 5 2018
Clarfication... When I said "Find some linux host you can successfully ssh to.", I meant ssh using the chrome extension.
,
Jan 5 2018
Thank you for providing more feedback. Adding requester "sc00335628@techmahindra.com" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jan 6 2018
I believe this is specific to "Secure Shell". Other terminals not using chromium-hterm do not seem to exhibit the same behavior. rginda, do you agree? Or is this likely fixable on the data transfer side?
,
Jan 6 2018
Also I am able to confirm the misbehavior, unfortunately. It is present in both Secure Shell and Secure Shell (dev) versions.
,
Jan 6 2018
+pwnall who may have better ideas about how or where to fix this I don't yet understand the chromium-hterm implementation well enough to know where the string used by drag-and-drop originates. It does not seem to be a simple innerText, as the DOM does not actually seem to have newlines or <br>s in it. Shell (bash/sh/ksh) command I used during testing, since my terminal window size is likely not identical: ( echo -n :\ ;x=0;while test $x -lt $COLUMNS; do x=`expr $x + 1`;echo -n .;done; echo )
,
Jan 6 2018
you can work around it by using ctrl+c instead
,
Jan 6 2018
Based on the comment #8, this seems like a problem specific to hterm. If it turns out there's something missing from DataTransfer that makes it difficult to get the right behavior into hterm, let's use this issue (or file a new issue) to track DataTransfer improvements. |
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by sc00335...@techmahindra.com
, Jan 5 2018Components: Blink>DataTransfer
Labels: Needs-Feedback Triaged-ET Needs-Triage-M63
2.7 MB
2.7 MB View Download