Ticket #2164 (closed defect: fixed)

Opened 15 years ago

Last modified 11 years ago

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

mcview-room-for-cursor-after-percent.patch (914 bytes) - added by egmont 15 years ago.
view the percent by one character to the left

Change History

comment:1 Changed 15 years ago by egmont

(stupid me, sorry... s/bottom left/top left/)

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:3 Changed 15 years ago by angel_il

ok, i try to fix it after 4.7.2 is out...

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

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:6 Changed 14 years ago by angel_il

  • Milestone changed from 4.7.3 to 4.7.4

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:9 Changed 12 years ago by andrew_b

  • Blocked By 2990 added

Moved to 2990_cleanup branch.

comment:10 Changed 12 years ago by andrew_b

  • Branch state changed from on review to no branch

comment:11 Changed 11 years ago by andrew_b

  • Blocked By 2990 removed

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

comment:13 Changed 11 years ago by andrew_b

  • Status changed from testing to closed
Note: See TracTickets for help on using tickets.