Author Topic: Bookmarks function problems  (Read 153 times)

Offline blinkinhek

  • Multiple posting newcomer
  • *
  • Posts: 15
Bookmarks function problems
« on: November 08, 2018, 05:37:33 pm »
I am using Code::Blocks v17.12
I seem to suffer from a problem with ever-growing lists of bookmarks.
If I add a bookmark (Ctrl-B) and later remove it (Ctrl-B) at a source-code line in the editor, and exit Code:Blocks, when I later fire-up the program, I have an extra bookmark, and the original one as well. This process can be repeated. Deleting the bookmarks file cleared all the bookmarks on opening the IDE, but the problem restarts. Similarly if I delete the XML entry in the bookmarks file, but retaining the file.
Looking at an extract, the data does not make much sense to me regarding the actual values..... 
Help appreciated!
Code: [Select]

<File name="app.h" open="1" top="1" tabpos="3">
<Cursor position="419" topLine="4" />
<BrowseMarks positions="" />
<Book_Marks positions="419,419,409,409,409,409" />
</File>
<File name="app.cpp" open="1" top="0" tabpos="9">
<Cursor position="117645" topLine="2214" />
<Book_Marks positions="117662,117656,96060,96021,117645,117645" />
</File>


Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11197
    • Travis build status
Re: Bookmarks function problems
« Reply #1 on: November 08, 2018, 07:52:31 pm »
It seems this feature is provided by the browse tracker plugin.

Can you reproduce the problem in a minimal example file?
Exact steps to reproduce would be helpful.

What OS are you using? Have you tried a night build?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline blinkinhek

  • Multiple posting newcomer
  • *
  • Posts: 15
Re: Bookmarks function problems
« Reply #2 on: November 08, 2018, 08:19:49 pm »
This is a really minimal single file sample using the Code::Blocks wizard:
I am running on Windows 10, but have not tried any of the nightly builds

Code: [Select]
#include <iostream>

using namespace std;

int main()
{
    cout << "Hello world!" << endl;
    return 0;
}
I tried adding bookmarks and removing with the following results:
1. Set 2 bookmarks lines 5 and 8, then exit codeblocks
Code: [Select]
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<BrowseTracker_layout_file>
<ActiveTarget name="Debug" />
<File name="main.cpp" open="1" top="1" tabpos="1">
<Cursor position="68" topLine="0" />
<BrowseMarks positions="" />
<Book_Marks positions="50,105" />
</File>
</BrowseTracker_layout_file>
2. 'Clear all bookmarks' then exit codeblocks
Code: [Select]
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<BrowseTracker_layout_file>
<ActiveTarget name="Debug" />
<File name="main.cpp" open="1" top="1" tabpos="1">
<Cursor position="105" topLine="0" />
<BrowseMarks positions="" />
<Book_Marks positions="105" />
</File>
</BrowseTracker_layout_file>
3. Clear all bookmarks again, exit again
Code: [Select]
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<BrowseTracker_layout_file>
<ActiveTarget name="Debug" />
<File name="main.cpp" open="1" top="1" tabpos="1">
<Cursor position="107" topLine="0" />
<BrowseMarks positions="" />
<Book_Marks positions="" />
</File>
</BrowseTracker_layout_file>
4. Used Ctrl B to add bookmark to line 5, Ctrl B to remove again, exit codeblocks
Code: [Select]
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<BrowseTracker_layout_file>
<ActiveTarget name="Debug" />
<File name="main.cpp" open="1" top="1" tabpos="1">
<Cursor position="107" topLine="0" />
<BrowseMarks positions="" />
<Book_Marks positions="55,55" />
</File>
</BrowseTracker_layout_file>

etc

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2106
Re: Bookmarks function problems
« Reply #3 on: November 09, 2018, 07:14:31 pm »
This bookmark duplication was fixed in SVN r11347 (pecanh 2018-03-26) and does not occur in the current nightly builds.