Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: pmlonline on March 14, 2018, 12:30:33 am

Title: Navigation bug: Jump back/Frwd
Post by: pmlonline on March 14, 2018, 12:30:33 am
I have Alt-left and Alt-right set to jump back and jump forward.  As you know, the jump back & forward feature is like a web browsers back and forward option.  I'll click on a file in the tab, then another file, and another file, etc., then press Alt-left numerous times it works. That is, each time it takes me back to the previous file I was looking at. Now, if I highlight a function that's in one of the files, right-click, and then select Find declaration of:, then the navigation jump history becomes messed up. Try jumping back. I don't know if it makes any difference, but in my project I have 12 .c files and 11 .h files opened, all displayed toward the top as tabs. I suspect the problem is that when I have codeblocks find and take me to the declaration that it searches through files and during this search it might be recording this activity in the jump history.

I'm using codeblocks 17.12 on the lastest Windows 10.

I just started using this feature, so I don't when it last worked, if ever.

Thanks!
Title: Re: Navigation bug: Jump back/Frwd
Post by: pmlonline on March 14, 2018, 04:29:32 pm
Correction: When highlighting a function and right-clicking on it, try selecting Find declaration of: (Not Find Implementation of:). That seems to produce the issue more often where it will mess up the jump history.
Title: Re: Navigation bug: Jump back/Frwd
Post by: ollydbg on March 14, 2018, 04:55:04 pm
I did some simple test, and I can't reproduce this bug.

Please note that Find declaration of or Find Implementation of is features of CodeCompletion plugin, and Jump backword and forward is from the Browser tracker plugin.
Title: Re: Navigation bug: Jump back/Frwd
Post by: pmlonline on March 14, 2018, 05:27:07 pm
I'll create a dummy project example that demonstrates the bug and upload it in a bit.
Title: Re: Navigation bug: Jump back/Frwd
Post by: pmlonline on March 14, 2018, 05:56:25 pm
Okay try this. It happens every time for me. First, load jump-bug.cbp, then exit codeblocks.

1. Start Codeblocks
2. Under Recent projects click jump-bug.cbp
3. Open all 9 files. Click on main.c.
4. Exit codeblocks.
5. Start codeblocks & click on jump-bug.cbp. It starts me in Main.c tab. Toward top of screen I have 9 file tabs.
6. Click on the following tabs in this order: a.c a.h b.c b.h c.c c.h d.c d.h
7. Press Alt-left (or whatever you have Jump back set to, or in menu click View > Jump > Jump back. It takes me to c.h, which is wrong. It should take me to d.c

Also, if you keep pressing Alt-left it will skip over b.c as well.

Any ideas how to fix this in the codeblocks source? Thanks for any help.
Title: Re: Navigation bug: Jump back/Frwd
Post by: ollydbg on March 16, 2018, 03:47:54 pm
Okay try this. It happens every time for me. First, load jump-bug.cbp, then exit codeblocks.

1. Start Codeblocks
2. Under Recent projects click jump-bug.cbp
3. Open all 9 files. Click on main.c.
4. Exit codeblocks.
5. Start codeblocks & click on jump-bug.cbp. It starts me in Main.c tab. Toward top of screen I have 9 file tabs.
6. Click on the following tabs in this order: a.c a.h b.c b.h c.c c.h d.c d.h
7. Press Alt-left (or whatever you have Jump back set to, or in menu click View > Jump > Jump back. It takes me to c.h, which is wrong. It should take me to d.c

Also, if you keep pressing Alt-left it will skip over b.c as well.

Any ideas how to fix this in the codeblocks source? Thanks for any help.

Hi, thanks for the steps, I can fully reproduce those bugs.
@pecan, can you have a look?  :)
Title: Re: Navigation bug: Jump back/Frwd
Post by: Pecan on March 19, 2018, 07:57:59 pm
Acknowledge, I'll work on it.