Code::Blocks

User forums => Using Code::Blocks => Topic started by: photon3108 on October 16, 2013, 03:43:13 am

Title: How to go back after "Goto Implementation"?
Post by: photon3108 on October 16, 2013, 03:43:13 am
01: int test() {
02: }
03:
04: int main() {
05:     test();
06: }

After "Goto Impelementation" at line 05, how to go back to line 05 from line 01?
It's not a good idea to use "Goto Line" or "Bookmark" because they are not convenient.
Title: Re: How to go back after "Goto Implementation"?
Post by: ollydbg on October 16, 2013, 08:24:40 am
There is a function you can use:
Menu->View->Jump->Jump back, note: you should have browsetracker plugin installed.
Title: Re: How to go back after "Goto Implementation"?
Post by: photon3108 on October 16, 2013, 08:46:03 am
Sometimes "Jump back" doesn't work.
I have installed Browse Tracker. Should I click any box in View->Browse Tracker->Setting?
Title: Re: How to go back after "Goto Implementation"?
Post by: ollydbg on October 16, 2013, 09:09:36 am
Sometimes "Jump back" doesn't work.
If the previous jump is too small, I mean you jump from the line 5 to line 1, which is only 4 lines, then I think BrowserTracker will not record the new caret position, so you can not jump back in a small jump.
I guess the minimal lines are 10 lines or more, I have not checked its source code yet. ;)
Quote
I have installed Browse Tracker. Should I click any box in View->Browse Tracker->Setting?
No.
Title: Re: How to go back after "Goto Implementation"?
Post by: Pecan on October 21, 2013, 07:50:11 pm
BrowseTracker remembers only one location per half page.
 
Title: Re: How to go back after "Goto Implementation"?
Post by: photon3108 on October 22, 2013, 07:12:11 am
These days, I use "Jump back" many times. It didn't always jump back the location where I jump from.
Sometimes it is near the location, sometimes not and sometimes correct. I only use "Goto Implementation".
Title: Re: How to go back after "Goto Implementation"?
Post by: ollydbg on October 22, 2013, 07:41:19 am
It didn't always jump back the location where I jump from.
Me to.
I suspect this is a bug, but it is not easy to reproduce this bug.
Title: Re: How to go back after "Goto Implementation"?
Post by: frithjofh on October 22, 2013, 12:58:12 pm
hi,

maybe a stupid question, but did you edit the file before the jump? like adding or erasing a line? maybe the jump back jumps to the original line number, but not to the original line as these may have shifted...

regards
Title: Re: How to go back after "Goto Implementation"?
Post by: photon3108 on October 23, 2013, 07:36:16 am
Anyway, it should jump back to the correct location when I do it immediately after "Goto Impelentation".
In the case, I am pretty sure that Codeblocks didn't always do it well.