Coding style.
- Remove all commented out code.
This commit is contained in:
parent
c3763d730b
commit
51bfa36a5d
2 changed files with 0 additions and 21 deletions
|
|
@ -133,7 +133,6 @@ class DiffEditor:
|
|||
self.left_editor.view_widget.is_scrollbar_right = False
|
||||
self.right_editor = editor.Editor()
|
||||
self.right_editor.load(right_path)
|
||||
# self.unify_duplicate_lines()
|
||||
self.show_sub_highlights = True
|
||||
self.diff = None
|
||||
|
||||
|
|
@ -175,16 +174,6 @@ class DiffEditor:
|
|||
self.right_editor.is_editing = False
|
||||
self.editors = [self.left_editor, self.right_editor]
|
||||
|
||||
# def unify_duplicate_lines(self):
|
||||
# lines = {line: line for line in self.left_editor.text_widget}
|
||||
# lines.update({line: line for line in self.right_editor.text_widget})
|
||||
# for editor_ in [self.left_editor, self.right_editor]:
|
||||
# for index, line in enumerate(editor.text_widget):
|
||||
# try:
|
||||
# editor_.text_widget[index] = lines[line]
|
||||
# except KeyError:
|
||||
# pass
|
||||
|
||||
def _equivalent_line(self, y):
|
||||
for opcode, left_start, left_end, right_start, right_end in self.diff:
|
||||
if self.editors[0] == self.right_editor:
|
||||
|
|
@ -254,12 +243,6 @@ class DiffEditor:
|
|||
self.left_editor.on_mouse_drag(x, y)
|
||||
elif x > right_x:
|
||||
self.right_editor.on_mouse_drag(x - right_x - 1, y)
|
||||
else: # mouse release
|
||||
pass
|
||||
# if x < left_x:
|
||||
# self.left_editor.on_mouse_release(x, y)
|
||||
# elif x > right_x:
|
||||
# self.right_editor.on_mouse_release(x - right_x - 1, y)
|
||||
|
||||
def update_diff(self):
|
||||
self.diff = difflib.SequenceMatcher(
|
||||
|
|
|
|||
|
|
@ -27,11 +27,7 @@ def highlight_str(line, bg_color, transparency=0.6):
|
|||
|
||||
|
||||
PYTHON_LEXER = pygments.lexers.get_lexer_by_name("python")
|
||||
# NATIVE_STYLE = pygments.styles.get_style_by_name("monokai")
|
||||
# NATIVE_STYLE = pygments.styles.get_style_by_name("native")
|
||||
NATIVE_STYLE = pygments.styles.get_style_by_name("paraiso-dark")
|
||||
# NATIVE_STYLE = pygments.styles.get_style_by_name("fruity")
|
||||
# NATIVE_STYLE = pygments.styles.get_style_by_name("solarizedlight")
|
||||
|
||||
|
||||
def _syntax_highlight(text, lexer, style):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue