microsoft / terminal

The new Windows Terminal and the original Windows console host, all in the same place!
MIT License
94.95k stars 8.22k forks source link

[Bug] Cursor Position Issue on Window Resize with Soft Line Wrapping #17844

Open 0x152a opened 2 weeks ago

0x152a commented 2 weeks ago

Windows Terminal version

1.21.2361.0

Windows build number

10.0.22631.0

Other Software

Steps to reproduce

  1. Print more than two lines ending with space and causing line wrap
    # `120` here is my console width
    for i in range(2):
    print('x' * 120 + ' ')
    print('yya')
    input('--')
  2. Resize the window to change the console width.

Expected Behavior

Cursor should be after -- of input('--') throughout the process

Actual Behavior

After resize, cursor is before a of print('yya')

ayush1233 commented 1 week ago

I want to work on this issue