Bug 307457 - JJ: Need a shortcut to return to the last editting location.
Summary: JJ: Need a shortcut to return to the last editting location.
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: part (show other bugs)
Version: unspecified
Platform: unspecified All
: NOR wishlist
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords: junior-jobs
: 335544 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-09-26 20:43 UTC by kdebugs
Modified: 2014-10-24 13:23 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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