Fix problem when editing unexistent lines

This commit is contained in:
Romain Failliot 2016-07-04 22:30:57 -04:00
parent 61131837d3
commit fa9907ac45
1 changed files with 2 additions and 2 deletions

View File

@ -3991,7 +3991,7 @@ class FileDiffViewer(gtk.Table):
for f in range(npanes): for f in range(npanes):
line = self.getLine(f, j) line = self.getLine(f, j)
if line is not None: 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 break
else: else:
# remove line # remove line
@ -4988,7 +4988,7 @@ class FileDiffViewer(gtk.Table):
cr.paint() cr.paint()
## draw the line number ## 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') colour = theResources.getColour('line_number')
cr.set_source_rgb(colour.red, colour.green, colour.blue) cr.set_source_rgb(colour.red, colour.green, colour.blue)
layout = self.create_pango_layout(str(line.line_number)) layout = self.create_pango_layout(str(line.line_number))