mirror of
https://github.com/tromey/gdb-gui.git
synced 2025-12-16 07:10:04 +01:00
fix missing import
Import the Differ class and remove the explicit call to difflib when instantiating it.
This commit is contained in:
@@ -22,7 +22,7 @@ from gi.repository import Gtk, Pango
|
|||||||
import functools
|
import functools
|
||||||
from gui.startup import in_gdb_thread, in_gtk_thread
|
from gui.startup import in_gdb_thread, in_gtk_thread
|
||||||
import gui.events
|
import gui.events
|
||||||
from difflib import SequenceMatcher
|
from difflib import SequenceMatcher, Differ
|
||||||
|
|
||||||
# FIXME: TO DO:
|
# FIXME: TO DO:
|
||||||
# * highlight the changes
|
# * highlight the changes
|
||||||
@@ -65,7 +65,7 @@ class DisplayWindow(gui.updatewindow.UpdateWindow):
|
|||||||
# Fall through.
|
# Fall through.
|
||||||
else:
|
else:
|
||||||
split = text.splitlines(1)
|
split = text.splitlines(1)
|
||||||
d = difflib.Differ()
|
d = Differ()
|
||||||
for line in d.compare(self.last_text, split):
|
for line in d.compare(self.last_text, split):
|
||||||
if line[0] == ' ':
|
if line[0] == ' ':
|
||||||
self.buffer.insert(self.buffer.get_end_iter(),
|
self.buffer.insert(self.buffer.get_end_iter(),
|
||||||
|
|||||||
Reference in New Issue
Block a user