Hi there,
probably you know the plugin “Marking Changed Rows” which displays a dot in front of each line when the line is modified. I try to expand this plugin such that it displays the modified rows in red, and as soon as the document is saved, the red marks are switched to green ones. The green marks are persistent as long as the document is open. As soon as it is reloaded, all the marks shall be discarded. The plugin should do something like this:
I come pretty close to my goal, but there is the problem that if new lines are inserted on top of saved lines, the green marks stay where they are, but in fact they should move downwards as well. Example:
Edit line 10, it gets a red marker. Then save. The marker is switched to green. My plugin does manage this behaviour as desired. Now insert a new line, say at line 1. The green dot stays where it is, but the text which previously was at line 10 is now at line 11, and so should be the green dot any ideas how I could do that?
Visual Studio or Notepad++ have some similar feature like that. I like it because if I have opened a document and make changes, I can easily track the lines where I did modify things without having to check the version control first.
Here’s my plugin Code: http://pastebin.com/VRZAisWq
(some of it copied from Marking Changed Rows)