Cursor misaligned in nano #4474

Closed
opened 2026-01-30 23:48:37 +00:00 by claunia · 10 comments
Owner

Originally created by @zulc22 on GitHub (Oct 15, 2019).

Environment

Windows build number:
Platform ServicePack Version      VersionString
-------- ----------- -------      -------------
 Win32NT             10.0.18362.0 Microsoft Windows NT 10.0.18362.0

Windows Terminal version (if applicable): 0.5.2762.0

Any other software?
GNU nano (windows port, installed from chocolatey.)

Steps to reproduce

Run GNU nano.

Expected behavior

Cursor is aligned with where the text is appearing, follows after a newline, etc. (screenshot of conhost)

conhost screenshot

Actual behavior

Cursor doesn't follow after a newline, and doesn't stay aligned to the insert point.

windows terminal screenshot

Originally created by @zulc22 on GitHub (Oct 15, 2019). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: Platform ServicePack Version VersionString -------- ----------- ------- ------------- Win32NT 10.0.18362.0 Microsoft Windows NT 10.0.18362.0 Windows Terminal version (if applicable): 0.5.2762.0 Any other software? GNU nano (windows port, installed from chocolatey.) ``` # Steps to reproduce <!-- A description of how to trigger this bug. --> Run GNU nano. # Expected behavior <!-- A description of what you're expecting, possibly containing screenshots or reference material. --> Cursor is aligned with where the text is appearing, follows after a newline, etc. (screenshot of conhost) ![conhost screenshot](https://uploads.kscott.cf/sharex/cmd_9sJyU82r9H.png) # Actual behavior <!-- What's actually happening? --> Cursor doesn't follow after a newline, and doesn't stay aligned to the insert point. ![windows terminal screenshot](https://uploads.kscott.cf/sharex/WindowsTerminal_lxyQGcg7jw.png)
claunia added the Resolution-Fix-AvailableIssue-BugArea-InputProduct-Conpty labels 2026-01-30 23:48:38 +00:00
Author
Owner

@egmontkob commented on GitHub (Oct 15, 2019):

Probably the same as #2642 and #3093.

@egmontkob commented on GitHub (Oct 15, 2019): Probably the same as #2642 and #3093.
Author
Owner

@PromoFaux commented on GitHub (Oct 18, 2019):

Confirmed in the wrong place. Also one cannot move the cursor about with the arrow keys.

If I SSH to a linux machine and use nano there, everything is fine. It appears to only affect win32 nano, which works fine in a normal Powershell window

image

@PromoFaux commented on GitHub (Oct 18, 2019): Confirmed in the wrong place. Also one cannot move the cursor about with the arrow keys. ![](https://i.imgur.com/yITq9IS.gif) If I SSH to a linux machine and use `nano` there, everything is fine. It appears to only affect win32 `nano`, which works fine in a normal Powershell window ![image](https://user-images.githubusercontent.com/1998970/67079120-845d5200-f18a-11e9-8938-ee102cbc2d62.png)
Author
Owner

@DHowett-MSFT commented on GitHub (Oct 23, 2019):

Honestly, this looks like GOW nano, which has made some eminently questionable decisions regarding how the Windows Console works. The arrow keys don't even work..?

Technically, this is a conpty issue, but I cannot figure out how it ended up so bad.

@DHowett-MSFT commented on GitHub (Oct 23, 2019): Honestly, this looks like GOW nano, which has made some eminently questionable decisions regarding how the Windows Console works. The arrow keys don't even work..? Technically, this is a conpty issue, but I cannot figure out how it ended up so bad.
Author
Owner

@zulc22 commented on GitHub (Oct 25, 2019):

the arrow keys work for me in my copy of nano. @PromoFaux may need to give more information on their part about that.

@zulc22 commented on GitHub (Oct 25, 2019): the arrow keys work for me in my copy of nano. @PromoFaux may need to give more information on their part about that.
Author
Owner

@PromoFaux commented on GitHub (Oct 25, 2019):

When pressing the arrow keys, the cursor does not move around, I just get [Unknown Command] at the bottom of the screen. using nano 2.5.3 installed via Chocolatey, using Terminal 0.6.2951.0

Works fine in a "normal" command prompt terminal, or powershell terminal

@PromoFaux commented on GitHub (Oct 25, 2019): When pressing the arrow keys, the cursor does not move around, I just get `[Unknown Command]` at the bottom of the screen. using nano 2.5.3 installed via Chocolatey, using Terminal 0.6.2951.0 Works fine in a "normal" command prompt terminal, or powershell terminal
Author
Owner

@zulc22 commented on GitHub (Oct 25, 2019):

oh wait-- you're right. the arrow keys don't work. sorry.

@zulc22 commented on GitHub (Oct 25, 2019): oh wait-- you're right. the arrow keys don't work. sorry.
Author
Owner

@jeffrson commented on GitHub (Nov 23, 2019):

I found the same issue.
"nano" installed via scoop (scoop.sh), which specifically comes from https://github.com/ScoopInstaller/Main/blob/master/bucket/nano.json or currently https://files.lhmouse.com/nano-win/nano-win_8303_v4.5-103-gb12aeeac.7z cannot move visible cursor. Although the cursor is moved internally because you would start typing at the new position.

No problem with "external" PowerShell.

OTOH it seems a bit strange that "nano" from GitForWindows does not show this behaviour - cursor works fine. Both versions being 4.5.

@jeffrson commented on GitHub (Nov 23, 2019): I found the same issue. "nano" installed via scoop (scoop.sh), which specifically comes from https://github.com/ScoopInstaller/Main/blob/master/bucket/nano.json or currently https://files.lhmouse.com/nano-win/nano-win_8303_v4.5-103-gb12aeeac.7z cannot move visible cursor. Although the cursor is moved internally because you would start typing at the new position. No problem with "external" PowerShell. OTOH it seems a bit strange that "nano" from GitForWindows does not show this behaviour - cursor works fine. Both versions being 4.5.
Author
Owner

@DHowett commented on GitHub (Apr 2, 2021):

I can no longer reproduce this using the linked nano from scoop!

@DHowett commented on GitHub (Apr 2, 2021): I can no longer reproduce this using the linked nano from scoop!
Author
Owner

@PromoFaux commented on GitHub (Apr 13, 2021):

Completely forgot about this issue :) But yeah, confirm no longer seeing the issue even with the same binary as before

image

@PromoFaux commented on GitHub (Apr 13, 2021): Completely forgot about this issue :) But yeah, confirm no longer seeing the issue even with the same binary as before ![image](https://user-images.githubusercontent.com/1998970/114592645-0f85ae00-9c83-11eb-8f19-4216dd05b61e.png)
Author
Owner

@DHowett commented on GitHub (Apr 13, 2021):

Thanks! :D

@DHowett commented on GitHub (Apr 13, 2021): Thanks! :D
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#4474