Ticket #2164 (closed defect: fixed)
Cursor position in mcview ncurses
Reported by: | egmont | Owned by: | andrew_b |
---|---|---|---|
Priority: | minor | Milestone: | 4.8.9 |
Component: | mcview | Version: | 4.7.0.4 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Branch state: | merged | Votes for changeset: | committed-master |
Description
When viewing a file that no longer grows, the cursor's position is different in the slang and ncurses builds.
With slang, the cursor is in the upper right corner, on the percent sign. I think this is nice: most terminals show the cursor as a reverse colored and often blinking character cell, but it's not intrusive there.
With ncurses, the cursor wraps around to the beginning of the next line, that is, the bottom left corner of the actual file contents viewing area. I find it very intrusive there: it clutters up the space that should show me the file, and makes the first character much harder to read.
I believe the ncurses version should also move the cursor to the top row.
Attachments
Change History
comment:2 Changed 15 years ago by egmont
Maybe the cleanest solution is to move the percent indicator one character to the left. That way the cursor wouldn't clutter the % sign (not even with slang), it could stand on its right side (just as it does for ">= 12345 bytes" if the file is still growing).
comment:4 Changed 15 years ago by angel_il
- Status changed from new to accepted
- Owner set to angel_il
- Milestone changed from 4.7 to 4.7.3
Changed 15 years ago by egmont
- Attachment mcview-room-for-cursor-after-percent.patch added
view the percent by one character to the left
comment:5 Changed 15 years ago by egmont
Should you choose to move the percent one character to the left, the attached patch does it, fixing the cursor position both for ncurses and slang.
If you'd like to keep the percent in the upper right corner, I think the question is how to prevent the cursor from wrapping to the next line after a tty_printf() in ncurses. Or explicitly move it back later.
comment:7 Changed 13 years ago by andrew_b
- Branch state set to no branch
- Milestone changed from 4.7.4 to Future Releases
comment:8 Changed 12 years ago by andrew_b
- Status changed from accepted to assigned
- Owner changed from angel_il to andrew_b
- Component changed from mc-core to mcview
- Branch state changed from no branch to on review
- Milestone changed from Future Releases to 4.8.9
Branch: 2164_mcviewer_cursor_position.
changeset:c8b72d44403e55f56bcb84d299c664d41dfb21b7
comment:12 Changed 11 years ago by andrew_b
- Status changed from assigned to testing
- Votes for changeset set to committed-master
- Resolution set to fixed
- Branch state changed from no branch to merged
Fixed as part of #2990: [e066a25cc56b8ba1e724c9b104ba7c425241a397].
(stupid me, sorry... s/bottom left/top left/)