Bug 307457

Summary: JJ: Need a shortcut to return to the last editting location.
Product: [Applications] kate Reporter: kdebugs
Component: partAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist CC: bansal.ashish096, kde-bugs
Priority: NOR Keywords: junior-jobs
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: All   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description kdebugs 2012-09-26 20:43:39 UTC
Some editors have a feature to return to the last location where editting took place.  Some keep track of the last few places (e.g. 3-5).

Examples:
In Crimson Editor, you can press Ctrl+\.
In MS Word, you can press Shift+F5.

Reason for the feature: Anytime you're working with a file that's more than a few lines long, it can be inconvenient to try to find your place again after you do a quick search for something (e.g. looking up something you wrote earlier, or a function definition, or something).

A cumbersome approximation of this feature would be to press Ctrl+z followed by Ctrl+Shift+z.

Reproducible: Always
Comment 1 Dominik Haumann 2012-10-24 21:56:13 UTC
Similar information also is available through the line modification system, all in all a valid wish.
Comment 2 Christoph Feck 2014-06-03 18:38:38 UTC
*** Bug 335544 has been marked as a duplicate of this bug. ***
Comment 3 Ashish Bansal 2014-08-18 06:47:02 UTC
I am trying to solve this junior job but experiencing problems while doing it. Although this is not the right way for solving but just a workaround for the problem.Any advice for doing it in another way along with some help and code references would be highly appreciable.
  
I am implementing it by using two SLOTS on the same signal (First SLOT as undo and second SLOT as redo when the specific key combination is triggered).Here is link to the code :
http://pastie.org/9482326
But the problem is I don't know in which class redo and undo functions are implemented  and hence which object would I be using in the connect function.
Comment 4 Christoph Feck 2014-09-13 21:11:29 UTC
Ashish, unless you gave up reading and hacking Kate code, I suggest to ask development-related questions on the kwrite-devel mailing list.
Comment 5 Sven Brauch 2014-10-24 13:23:22 UTC
Git commit 6551b56a329b0674af93e85a87fae4850dbbe1cd by Sven Brauch, on behalf of Ashish Bansal.
Committed on 24/10/2014 at 13:22.
Pushed by brauch into branch 'master'.

implement "go to last editing position" action

REVIEW:120299

M  +45   -0    src/document/katedocument.cpp
M  +21   -0    src/document/katedocument.h
M  +25   -0    src/view/kateview.cpp
M  +10   -0    src/view/kateview.h

http://commits.kde.org/ktexteditor/6551b56a329b0674af93e85a87fae4850dbbe1cd