Ticket #3826 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

[mcview] Goto doesn't grow file as much as needed

Reported by: egmont Owned by: andrew_b
Priority: major Milestone: 4.8.20
Component: mcview Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: merged Votes for changeset: committed-master

Description

Followup of #3819:

mcview -> F5 -> Goto decimal/hexadecimal offset doesn't grow the file if necessary, rather stops at an earlier offset.

Goto percent doesn't work either. It's trickier because no matter what the percent value is, it'd need to read the entire contents.

(Goto line number works as expected.)

Change History

comment:1 Changed 7 years ago by egmont

  • Component changed from mc-core to mcview

comment:2 Changed 7 years ago by andrew_b

Branch: 3826_mcview_goto_fixes
Initial changeset:a4c4d0194c801d463c1df7b9c3b89836207580fe

Version 0, edited 7 years ago by andrew_b (next)

comment:3 Changed 7 years ago by andrew_b

  • Status changed from new to accepted
  • Owner set to andrew_b
  • Branch state changed from no branch to on review
  • Milestone changed from Future Releases to 4.8.20

comment:4 follow-up: ↓ 5 Changed 7 years ago by egmont

Thanks for working on this!

"goto offset" is an overkill, it wouldn't need to read the entire file, just enough to get to that offset. I'm wondering if simply passing the desired offset as second argument would do. Maybe a bit bigger number is required to read a screenful more, or maybe that's automatically done by the displaying code??

(Sorry, I've no time nowadays to take a closer look or work on it.)

comment:5 in reply to: ↑ 4 Changed 7 years ago by andrew_b

Replying to egmont:

"goto offset" is an overkill, it wouldn't need to read the entire file, just enough to get to that offset.

I agree. I've modified branch. Please review again.

Last edited 7 years ago by andrew_b (previous) (diff)

comment:6 Changed 7 years ago by andrew_b

  • Votes for changeset set to andrew_b
  • Branch state changed from on review to approved

comment:7 Changed 7 years ago by andrew_b

  • Status changed from accepted to testing
  • Votes for changeset changed from andrew_b to committed-master
  • Resolution set to fixed
  • Branch state changed from approved to merged

Merged to master: [5e5f57cf2fecc040a1d0a967edf3eddd13ad504e].

git log --pretty=oneline b88e72e..5e5f57c

comment:8 Changed 7 years ago by andrew_b

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