Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
BrowseTracker plugin
Pecan:
--- Quote from: ironhead on April 02, 2008, 08:06:15 pm ---...<snip>...
My understanding was that BrowseTracker would keep track of the fact that main.cpp was opened to line 47 and return to that the next time I opened main.cpp (even after closing and re-opening the project). Perhaps I missunderstood the intent of BrowseTracker?
--- End quote ---
Correct, that is a misunderstanding.
It is CodeBlocks' "layout" processing that repositions files on reopen. The reason it's not repositioning for you now is that you are closing the file before closing the project.
If you leave the file open, but just close the project, "layout" will reposition the file as you left it.
However, you could set a BrowseMark at a line, then close the file.
On reopen, Browsetracker will be able to reposition to the BrowseMark with Alt-Up/Down.
Also, your "misunderstanding" presents a good idea. I'll think on it.
Seronis:
--- Quote from: Pecan on April 03, 2008, 01:52:02 am ---Also, your "misunderstanding" presents a good idea. I'll think on it.
--- End quote ---
I agree. I would appreciate this extension greatly too.
Pecan:
--- Quote from: ironhead on April 02, 2008, 08:06:15 pm ---Re-open the project and open:
Sources
-- emerge
----main.cpp (editor starts at the top of the file)
--- End quote ---
I cannot seem to recreate this problem.
I position to a line, close the file, then close the project.
When I then reopen the project, then reopen the file, the cursor is positioned correctly to the line I last had the cursor when it was closed.
Are you certain that when you closed the file that the *cursor* was on the line you wished to be recorded at close?
Are you certain that the file actually belongs to the active project? Only files added to the project are processed by layout.
ironhead:
Hrm... it's is indeed working as you describe. The problem is that when I open the file again the cursor position is cleared. Can it be setup that it doesn't clear the cursor position on load?
edit
It looks like a focus issue. When I double click to open the file, the cursor line is selected, but the focus goes back to the file Management Pane, as a result the cursor line 'disappears'.
Pecan:
--- Quote from: ironhead on April 06, 2008, 05:52:15 am ---It looks like a focus issue. When I double click to open the file, the cursor line is selected, but the focus goes back to the file Management Pane, as a result the cursor line 'disappears'.
--- End quote ---
Turn on Settings->Editor->MouseDragScrolling->AutoFocusEditors
and see if that is more to your liking.
You might want to also try
Settings->Editor->MouseDragScrolling->FocusFollowsMouse
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version