microsoft / microsoft/terminal
Rows should remember their width (MeasureRight())
- Dominant language
- C++
- Stars
- 105k
- Forks
- 9.6k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 29
Description
### Windows Terminal version
1.21.2361.0
### Windows build number
10.0.22631.0
### Other Software
- System Language: `zh_cn`
- Console Font: `Hack Nerd Font Mono`
- Font Size: 12
### Steps to reproduce
1. Print more than two lines ending with space and causing line wrap
```python
# `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')`
- Before resize: (width is 120)

- After resize: (width is 121, line wrap here seems wrong too)

Contributor guide
Research direction
Start at the MeasureRight() entry point named in the issue and reproduce the behavior with the provided Python snippet in a 120-column window. Resize the Windows Terminal window and verify that wrapped rows retain their widths, the line wrapping remains correct, and the cursor stays after `--` in `input('--')`.
Written by the indexing model from the issue text.
Assessment
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100