Author Topic: BrowseTracker : toolbar button to jump to previously edited location  (Read 14927 times)

Offline christo

  • Multiple posting newcomer
  • *
  • Posts: 56
Changes to add a button to jump to previously edited location is available in my github fork : https://github.com/josephch/codeblocks/commit/029005671abfeb6d7c3c07390030605448a09dff

I think it is a good idea to add this feature as it is very helpful for navigation during code editing. Button images are generated via chatgpt and might not be the most aesthetic.

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2883
Re: BrowseTracker : toolbar button to jump to previously edited location
« Reply #1 on: September 11, 2025, 04:02:34 am »
I cannot figure out how to save that page so I can copy the code out of it. I tried save as html, save as jpg, save as ptf, etc. and none of them allow me to mark and copy from them

Any one know how to capture the code out of that page?

Offline christo

  • Multiple posting newcomer
  • *
  • Posts: 56
Re: BrowseTracker : toolbar button to jump to previously edited location
« Reply #2 on: September 11, 2025, 06:11:31 am »
Hi Pecan, you can download it as a patch by adding .patch after commit hash.

https://github.com/josephch/codeblocks/commit/029005671abfeb6d7c3c07390030605448a09dff.patch

If this is not sufficient, I'll attach a proper patch later after work.

Thanks

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2883
Re: BrowseTracker : toolbar button to jump to previously edited location
« Reply #3 on: September 11, 2025, 06:33:08 am »
Hi Pecan, you can download it as a patch by adding .patch after commit hash.

https://github.com/josephch/codeblocks/commit/029005671abfeb6d7c3c07390030605448a09dff.patch

If this is not sufficient, I'll attach a proper patch later after work.

Thanks

Thanks. That looks like I can use that for cut and paste. I appreciate it.

Offline christo

  • Multiple posting newcomer
  • *
  • Posts: 56
Re: BrowseTracker : toolbar button to jump to previously edited location
« Reply #4 on: September 11, 2025, 02:01:17 pm »
Hi Pecan, attaching modified files w.r.t svn revision 13733

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2883
Re: BrowseTracker : toolbar button to jump to previously edited location
« Reply #5 on: September 11, 2025, 08:33:57 pm »
Hi Pecan, attaching modified files w.r.t svn revision 13733

Really nice mod. Thanks, I'll test it for a couple of day, then commit.

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2883
@Christo

Unfortunately, this patch does not record the "last modified"
location in an editor.
It records the "first modified" in the editor and does not record any further mod locations for that editor until the modifed flag is cleared by a save.

This is because the event it is dependent upon (cbEVT_EDITOR_MODIFIED) is issued only on the first modification of an editor.

For example: Perform a mod in EditorA, then again in EditorB.
Go back to EditorA and make another mod.
If you click on "Jump to last modification" you'll end up in EditorB, not EditorA where the last mod was actually made because CB did not issue a second mod event for EditorA since the mod flag was already set.

I think this can be solved by depending on the editor hook instead of the CB event.

I'll look into it.
« Last Edit: Yesterday at 08:18:38 pm by Pecan »

Offline christo

  • Multiple posting newcomer
  • *
  • Posts: 56
Thank you @Pecan

Yes, I can also reproduce that issue. I always save files, that might be the reason I didn't notice it before. Sorry about that.