From 95ca504fd3509839c601f07d56ecfaf404911b85 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 10 Sep 2013 14:26:44 +0200 Subject: add class edit for storing edits in MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/editring.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/editring.py b/src/editring.py index c466234..4c304be 100644 --- a/src/editring.py +++ b/src/editring.py @@ -20,6 +20,27 @@ along with this program. If not, see . ''' + +class Edit(): + ''' + A line edit + ''' + + def __init__(self, deleted, inserted, y, old_x, new_x): + ''' + Constructor + + @param deleted:str? The text deleted by the edit + @param inserted:str? The text inserted by the edit + @param y:int The index of the line the edit was made one + @param old_x:int The position on the line before the edit was made + @param new_x:int The position on the line after the edit was made + ''' + self.deleted, self.inserted = deleted, inserted + self.y, self.old_x, self.new_x = y, old_x, new_x + + + class Editring(): ''' Editing ring class -- cgit v1.2.3-70-g09d2