From fa9907ac4598c3cdc93bcb67a30b17487826bb4c Mon Sep 17 00:00:00 2001 From: Romain Failliot Date: Mon, 4 Jul 2016 22:30:57 -0400 Subject: [PATCH] Fix problem when editing unexistent lines --- src/usr/bin/diffuse | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/usr/bin/diffuse b/src/usr/bin/diffuse index 54ba547..2ce3359 100755 --- a/src/usr/bin/diffuse +++ b/src/usr/bin/diffuse @@ -3991,7 +3991,7 @@ class FileDiffViewer(gtk.Table): for f in range(npanes): line = self.getLine(f, j) if line is not None: - if line.line_number > 0 or (f != skip and line.getText() is not None): + if line.line_number is not None or (f != skip and line.getText() is not None): break else: # remove line @@ -4988,7 +4988,7 @@ class FileDiffViewer(gtk.Table): cr.paint() ## draw the line number - if line is not None and line.line_number > 0: + if line is not None and line.line_number is not None: colour = theResources.getColour('line_number') cr.set_source_rgb(colour.red, colour.green, colour.blue) layout = self.create_pango_layout(str(line.line_number))