terminal icon indicating copy to clipboard operation
terminal copied to clipboard

Command line buffer insertion error in WSL

Open tealsuki opened this issue 8 years ago • 5 comments

Microsoft Windows [Version 10.0.16299.371]

Context: This issue was discovered after editing the same command multiple times, after the length of the command extended past the window boundary. Reproducibility may vary.

  • Attempted to create a long chain command with a python utility to retrieve files from Internet Archive

tealsuki@DESKTOP-NENQ6QK:/mnt/d/temp$ ia search 'collection:solarsystemcollection' --itemlist | parallel --no-notice -j4 'ia download {} --glob="*.jpg|*.jpeg"'

  • Decide to cancel and change parameters (CTRL+C, followed by UPARROW to return to command in buffer, followed by cursoring through and editing the command)

tealsuki@DESKTOP-NENQ6QK:/mnt/d/temp$ ia search 'collection:printer-manuals-lexmark' --itemlist | parallel --no-notice -j4 'ia download {} --glob="*.pdf"'

image

  • What's wrong / what should be happening instead:

Command fails silently in this instance. Upon returning to it in the buffer, it is revealed that the insertion point was in the incorrect position, parts of the displayed text were chopped out when the first character was inserted.

image

  • Additional notes When editing the command, pressing the up arrow once more to traverse the buffer, and then pressing the down arrow to return to what Bash has saved as the "workspace" command (my description) will present the actual state of the command again.

Traversing the buffer multiple steps may affect reproducibility Resizing the window may also affect reproducibility

May be related to WSL#1307 WSL#1497 and WSL#1756

  • Console settings: image image

tealsuki avatar Apr 29 '18 06:04 tealsuki

Issue persists in Windows 10 Version 1803

tempsnip

Judging by the "so" leftover from the previous command, and the unexpected immediate visual deletion of the "' " (single quote and a space) the internal cursor seemed to assume it was 2 places to the right of where I'd intended to begin deletion with the visual cursor (positioned at the closing single quote). This appears to also be limited to the last executed command in my test. Further traversal does not produce the same effect.

Also important to note that the length of the deletion/cursor shift may not always be 2 characters, it happens to be the case with this particular command's length and buffer/window configuration. More rigorous testing is necessary.

tealsuki avatar Apr 30 '18 21:04 tealsuki

Still having this issue in 1803 build 17134.765.

tfinn81 avatar Jun 26 '19 18:06 tfinn81

That build is two major versions out of date. Learning that it still reproduces as of approximately two (at this point) years ago is not helpful :smile:

DHowett-MSFT avatar Jun 26 '19 23:06 DHowett-MSFT

@tealsuki Is this still happening for you (especially in the Windows Terminal)? This report's a few years old now and hasn't had any bumps on any recent builds of Windows, so it's entirely possible that this is something we just fixed along the way.

zadjii-msft avatar Nov 22 '21 14:11 zadjii-msft

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

ghost avatar Nov 26 '21 16:11 ghost