eric6/UI/CompareDialog.py

changeset 7264
bedbe458d792
parent 7229
53054eb5b15a
child 7360
9190402e4505
equal deleted inserted replaced
7263:c1af2e327675 7264:bedbe458d792
51 Internal function to remove all diff markers. 51 Internal function to remove all diff markers.
52 52
53 @param line line to work on (string) 53 @param line line to work on (string)
54 @return line without diff markers (string) 54 @return line without diff markers (string)
55 """ 55 """
56 return line\ 56 return (
57 .replace('\0+', "")\ 57 line
58 .replace('\0-', "")\ 58 .replace('\0+', "")
59 .replace('\0^', "")\ 59 .replace('\0-', "")
60 .replace('\0^', "")
60 .replace('\1', "") 61 .replace('\1', "")
62 )
61 63
62 linenumberformat = "{{0:{0:d}d}}".format(linenumberwidth) 64 linenumberformat = "{{0:{0:d}d}}".format(linenumberwidth)
63 emptylineno = ' ' * linenumberwidth 65 emptylineno = ' ' * linenumberwidth
64 66
65 for (ln1, l1), (ln2, l2), flag in _mdiff(a, b, None, None, 67 for (ln1, l1), (ln2, l2), flag in _mdiff(a, b, None, None,
432 434
433 def __fileChanged(self): 435 def __fileChanged(self):
434 """ 436 """
435 Private slot to enable/disable the Compare button. 437 Private slot to enable/disable the Compare button.
436 """ 438 """
437 if not self.file1Picker.text() or \ 439 if (
438 not self.file2Picker.text(): 440 not self.file1Picker.text() or
441 not self.file2Picker.text()
442 ):
439 self.diffButton.setEnabled(False) 443 self.diffButton.setEnabled(False)
440 else: 444 else:
441 self.diffButton.setEnabled(True) 445 self.diffButton.setEnabled(True)
442 446
443 @pyqtSlot(bool) 447 @pyqtSlot(bool)

eric ide

mercurial