ContextBrowser questions (Tabs, files without DUChain, ...)

David Nolden zwabel at
Thu Jul 15 18:54:39 UTC 2010

This is tricky. The problem is that we only want meaningful jumps in the
history, so that "back" and "forward" bring you to meaningful positions.
This is especially importand when you jump somewhere (without knowing where
exactly it takes you) using quickopen or similar, because else you have a
hard time finding the old position back.

On the other hand if you switch the tab manually, you can easily manually
switch back. The same is true for manual navigation using the cursor.

I'm not sure whether adding an entry on tab-switching would be a good thing.
The position after a tab-switch may be completely meaningless because you
simply wanted to take a look on what's in the tab or similar.

There may be other occassions that would be better for adding a history
- when the user edited some code
- when the cursor was within a function or class block for a specific
minimum time (10s maybe?)

Greetings, David

Am 15.07.2010 20:09 schrieb "Milian Wolff" <mail at>:


I notice that switching tabs does not add items to the context browser, as
that only listens to documentJumpPerformed. Should the latter also be
in such cases? Or should I instead manually listen to documentActivated?

I personally find it strange that e.g. quickOpen adds items to the context
browser (even if the file was open), but switching tabs does not.

Furthermore files without DUChain integration always get the cursor at 0,0
placed which sucks really bad. I'm tempted to integrate basic features
which would essentially add history items, when the user changes the cursor
significantly, where I'd probably define that as abs(currentLine - lastLine)
X. X = 1 would already exclude arrow navigation and cover mouse clicking,
1, end, pageup/down scrolling. What do you think?
Milian Wolff
mail at

KDevelop-devel mailing list
KDevelop-devel at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the KDevelop-devel mailing list