Ticket #2543 (closed defect: fixed)
Hex viewer mode does not restore cursor position
Reported by: | vitalif | Owned by: | andrew_b |
---|---|---|---|
Priority: | minor | Milestone: | 4.8.0 |
Component: | mcview | Version: | master |
Keywords: | Cc: | gotar@… | |
Blocked By: | Blocking: | ||
Branch state: | merged | Votes for changeset: | committed-master committed-stable |
Description
If you are in hex viewer mode and mcview_remember_file_position=1, the viewer restores view->dpy_start, but does not restore view->hex_cursor. So the restored position is basically useless in hex mode, because when you move cursor, you go back to the beginning of file.
Attaching a patch fixing this issue.
Attachments
Change History
Changed 14 years ago by vitalif
- Attachment viewer-remember-hex-position.diff added
comment:2 Changed 13 years ago by andrew_b
- Status changed from new to accepted
- Votes for changeset set to andrew_b
- Keywords stable-candidate added
- Branch state changed from no branch to on review
- Milestone changed from 4.8 to 4.8.0
- Owner set to andrew_b
Thanks!
Patch was applied with minor modifications.
Branch: 2543_hexview_cursor_position (parent: master)
changeset:6253decba56beeaa08b19e15223b934ae5ab4afd
comment:3 follow-up: ↓ 4 Changed 13 years ago by slavazanko
- Open in mcview any big text file.
- Go to some position in a middle of text file.
- Toggle HEX view mode (F4).
- Place cursor at middle of any line (before \n symbol)
- Toggle normal view mode (F4)
- press UP key
Expected action: viewer will scroll up by one line.
Actual action: viewer scrolled up by few lines.
comment:4 in reply to: ↑ 3 ; follow-up: ↓ 5 Changed 13 years ago by andrew_b
Replying to slavazanko:
Expected action: viewer will scroll up by one line.
Actual action: viewer scrolled up by few lines.
Yes. But this is not a result of the patch. The switch between view modes is buggy in current master. The new ticket is required for that.
comment:5 in reply to: ↑ 4 Changed 13 years ago by andrew_b
- Votes for changeset andrew_b deleted
Fixed: b471db490548dc71d0333f3d4bf61c1f0767d460
Review and vote please.
comment:7 Changed 13 years ago by angel_il
- Votes for changeset changed from slavazanko to slavazanko angel_il
- Branch state changed from on review to approved
comment:8 Changed 13 years ago by andrew_b
- Status changed from accepted to testing
- Votes for changeset changed from slavazanko angel_il to committed-master
- Resolution set to fixed
- Branch state changed from approved to merged
Merged to master.
changeset:bcd5db8a6af6762182ef99f8d4070809ea49e3ba
git log --pretty=oneline 07c14a4..bcd5db8
comment:9 Changed 13 years ago by andrew_b
Cherry-picked to 4.7.5-stable.
Initial changeset:fe240f11029ef36b2731a13bce4f331bb95a4c42
git log --pretty=oneline c21f9d0..8272760
comment:10 Changed 13 years ago by andrew_b
- Keywords stable-candidate removed
- Status changed from testing to closed
- Votes for changeset changed from committed-master to committed-master committed-stable
Restore position in hex viewer mode, save hex_cursor, not dpy_start in hex mode