JOE editor handles enter key incorrectly - middle of line #3046

Open
opened 2026-01-30 23:11:40 +00:00 by claunia · 0 comments
Owner

Originally created by @robvarga on GitHub (Aug 1, 2019).

Originally assigned to: @zadjii-msft on GitHub.

Environment

Windows build number: [Version 10.0.18362.267] Windows 10 Professional Version 1903
Windows Terminal version (if applicable): whatever is out-of-the-box

Any other software?
  • Ubuntu 18.04.LTS from the Microsoft Store fully updated with
    sudo apt update ; sudo apt upgrade
  • The joe editor installed in Ubuntu with
    sudo apt install joe

Steps to reproduce

  1. Start the joe editor with a new file without specifying a filename
  2. Type 3 lines at least to see what happens, e.g.:
line1
line2
line3
  1. Go back with the cursor to the middle of line2, e.g. before the 'n' character
  2. Press the ENTER key.

Expected behavior

The lines under the line which the cursor resides in should scroll down one, and the bottom line of the screen should scroll out, and the part of the line with the cursor following the cursor should go to the beginning of the line vacated by the scrolling down of the subsequent lines and the cursor should move to the beginning of the vacated line.

I.e. you should see

line1
li
ne2
line3

and the new cursor position should be before the 'n' character of ne2.

Note that after saving the file, the expected behavior is what correctly happens in the file data, only the display behavior is incorrect.

Note, that this worked correctly in Windows 1803 with the same Ubuntu 18.04 LTS and joe versions. The upgrade to Windows 1903 broke this, and reinstalling joe and reinstalling the entire Ubuntu 18.04 LTS distribution did not fix this either.

Actual behavior

No scrolling of the part after the cursor happens, instead the line following the line the cursor was in is replaced with the part of the line the cursor resides in and the cursor (correctly) moves down to the beginning of the next line.

I.e. you see

line1
li
ne2

and the cursor position is (correctly) before the 'n' character of 'ne2'.

Note, that this behaviour is different from #2186 (hence the separate bug), because the part of the line following the cursor overwrites the subsequent line, whereas in #2186 it does not.

Note that after saving the file, the expected behavior is what correctly happens to the file data, only the display behavior is incorrect.

Originally created by @robvarga on GitHub (Aug 1, 2019). Originally assigned to: @zadjii-msft on GitHub. <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 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. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: [Version 10.0.18362.267] Windows 10 Professional Version 1903 Windows Terminal version (if applicable): whatever is out-of-the-box Any other software? ``` - Ubuntu 18.04.LTS from the Microsoft Store fully updated with `sudo apt update ; sudo apt upgrade` - The joe editor installed in Ubuntu with `sudo apt install joe` # Steps to reproduce 1. Start the joe editor with a new file without specifying a filename 2. Type 3 lines at least to see what happens, e.g.: ``` line1 line2 line3 ``` 3. Go back with the cursor to the middle of line2, e.g. before the 'n' character 4. Press the ENTER key. # Expected behavior The lines under the line which the cursor resides in should scroll down one, and the bottom line of the screen should scroll out, and the part of the line with the cursor following the cursor should go to the beginning of the line vacated by the scrolling down of the subsequent lines and the cursor should move to the beginning of the vacated line. I.e. you should see ``` line1 li ne2 line3 ``` and the new cursor position should be before the 'n' character of ne2. **Note that after saving the file, the expected behavior is what correctly happens in the file data, only the display behavior is incorrect.** **Note, that this worked correctly in Windows 1803 with the same Ubuntu 18.04 LTS and joe versions. The upgrade to Windows 1903 broke this, and reinstalling joe and reinstalling the entire Ubuntu 18.04 LTS distribution did not fix this either.** # Actual behavior No scrolling of the part after the cursor happens, instead the line following the line the cursor was in is replaced with the part of the line the cursor resides in and the cursor (correctly) moves down to the beginning of the next line. I.e. you see ``` line1 li ne2 ``` and the cursor position is (correctly) before the 'n' character of 'ne2'. Note, that this **behaviour is different from #2186 (hence the separate bug)**, because the part of the line following the cursor overwrites the subsequent line, whereas in #2186 it does not. **Note that after saving the file, the expected behavior is what correctly happens to the file data, only the display behavior is incorrect.**
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#3046