ContextBrowser questions (Tabs, files without DUChain, ...)
mail at milianw.de
Thu Jul 15 19:11:44 UTC 2010
On Thursday, 15. July 2010 20:54:39 David Nolden wrote:
> 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?)
I agree, adding history items on tab switch might spam the list there. Hm.
But I like the idea with "add history on edit". That would at least make it
somewhat working in non-duchain enabled files. Everytime I work in e.g. Kate's
want to jump back to the place I edited last. That would work with your
approach, since it would also add a HistoryItem for the looked-up function,
since jumping back in history triggers the documentJumpPerformed, right?
> Am 15.07.2010 20:09 schrieb "Milian Wolff" <mail at milianw.de>:
> 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 -
> 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 milianw.de
> KDevelop-devel mailing list
> KDevelop-devel at kdevelop.org
mail at milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 198 bytes
Desc: This is a digitally signed message part.
More information about the KDevelop-devel