News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Bookmarks function problems

Started by blinkinhek, November 08, 2018, 05:37:33 PM

Previous topic - Next topic

blinkinhek

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!

<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>


oBFusCATed

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!]

blinkinhek

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


#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

<?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

<?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

<?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

<?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

Pecan

This bookmark duplication was fixed in SVN r11347 (pecanh 2018-03-26) and does not occur in the current nightly builds.