Bug 200753 - Adding a "recently modified lines" system
Summary: Adding a "recently modified lines" system
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: HI wishlist
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 170082 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-07-19 11:30 UTC by Jean-Marie Favreau
Modified: 2011-09-04 19:46 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.8.0


Attachments
Virtual example of the suggested system (160.41 KB, image/jpeg)
2009-07-19 11:41 UTC, Jean-Marie Favreau
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-Marie Favreau 2009-07-19 11:30:48 UTC
Version:            (using KDE 4.2.2)
OS:                Linux
Installed from:    Debian testing/unstable Packages

A system to bookmark lines is currently available in kate and other kde editors since years.
But a new automatic system as described in the following should be more easy to use.

The idea is to use, as for the bookmarked lines, the scroll bar to add colored marks corresponding to recently modified lines. A shaded system (from white to red for example) may be used to described elapsed time since the last modification, as in the kate list of edited files.
Comment 1 Jean-Marie Favreau 2009-07-19 11:41:33 UTC
Created attachment 35455 [details]
Virtual example of the suggested system
Comment 2 Dominik Haumann 2009-07-19 11:44:26 UTC
Another idea is to use vertical bars as in qt-creator http://www.qtsoftware.com/images/products/screenshot-qt-creator-editor. This indicates what lines are new and saved. We could even have a look at how they implement it.
Comment 3 Jean-Marie Favreau 2009-07-19 12:11:59 UTC
The main advantage of the scroll bar choice is the overview of the integral document. The navigation is more easy with this approach. However the two approaches are mutually complementary.
Comment 4 Dominik Haumann 2010-11-14 22:46:49 UTC
*** Bug 170082 has been marked as a duplicate of this bug. ***
Comment 5 Dominik Haumann 2010-11-21 11:28:58 UTC
Btw, perfectly suited as a GSoC project.
Comment 6 Dominik Haumann 2011-09-03 20:35:34 UTC
Git commit c5946bf2c15bf166be3f83c93c0ac49396582c94 by Dominik Haumann.
Committed on 03/09/2011 at 22:20.
Pushed by dhaumann into branch 'master'.

implement line modification system

TODO:
- unit test
- improve visual appearance
- enable / disable in config page
- optionally show modified lines in scroll bar
- fine tuning

PS: Qt Creator's line modification system is totally buggy :^)
Example: http://wstaw.org/m/2011/09/03/plasma-desktopgz5185.jpg

CCBUG: 200753
CCMAIL: kwrite-devel@kde.org

M  +3    -2    part/undo/kateundomanager.h
M  +14   -1    part/view/kateviewhelpers.cpp
M  +326  -14   part/undo/kateundo.cpp
M  +31   -8    part/undo/kateundomanager.cpp
M  +34   -1    part/buffer/katetextline.h
M  +5    -0    part/buffer/katetextbuffer.h
M  +53   -36   part/undo/kateundo.h
M  +3    -6    part/document/katedocument.cpp
M  +43   -4    part/buffer/katetextblock.cpp
M  +9    -0    part/buffer/katetextbuffer.cpp
M  +5    -0    part/buffer/katetextblock.h

http://commits.kde.org/kate/c5946bf2c15bf166be3f83c93c0ac49396582c94
Comment 7 Dominik Haumann 2011-09-04 19:42:00 UTC
Implemented for KDE 4.8 and works perfectly! If you want, you can try it already now: http://kate-editor.org/get-it/

It does not have scroll-bar marks yet, though. It could be added optionally, but it does not scale: For each modification (typing a character for instance), we'd have to iterate over all lines to repaint the marks in the scrollbar correctly.