Command line buffer insertion error in WSL #238

Closed
opened 2026-01-30 21:46:35 +00:00 by claunia · 5 comments
Owner

Originally created by @tealsuki on GitHub (Apr 29, 2018).

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
Originally created by @tealsuki on GitHub (Apr 29, 2018). ### 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](https://user-images.githubusercontent.com/1473126/39403873-9084dbb4-4b5c-11e8-9225-66ea8061cd0c.png) * 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](https://user-images.githubusercontent.com/1473126/39403892-e4ee176a-4b5c-11e8-8dd9-b9dc43277e7b.png) * 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](https://github.com/Microsoft/WSL/issues/1307) [WSL#1497](https://github.com/Microsoft/WSL/issues/1497) and [WSL#1756](https://github.com/Microsoft/WSL/issues/1756) * Console settings: ![image](https://user-images.githubusercontent.com/1473126/39403730-2bcb1344-4b59-11e8-9f3b-86b8b25a5341.png) ![image](https://user-images.githubusercontent.com/1473126/39403734-35dc821e-4b59-11e8-9d15-ff3447e6f561.png)
Author
Owner

@tealsuki commented on GitHub (Apr 30, 2018):

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 commented on GitHub (Apr 30, 2018): Issue persists in Windows 10 Version 1803 ![tempsnip](https://user-images.githubusercontent.com/1473126/39451589-8733b2c0-4ca5-11e8-8c10-292f2bb1cbc4.png) 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.
Author
Owner

@tfinn81 commented on GitHub (Jun 26, 2019):

Still having this issue in 1803 build 17134.765.

@tfinn81 commented on GitHub (Jun 26, 2019): Still having this issue in 1803 build 17134.765.
Author
Owner

@DHowett-MSFT commented on GitHub (Jun 27, 2019):

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 😄

@DHowett-MSFT commented on GitHub (Jun 27, 2019): 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:
Author
Owner

@zadjii-msft commented on GitHub (Nov 22, 2021):

@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 commented on GitHub (Nov 22, 2021): @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.
Author
Owner

@ghost commented on GitHub (Nov 26, 2021):

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 commented on GitHub (Nov 26, 2021): 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**.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#238