Strip newline from text being dragged into the terminal

This commit is contained in:
Chris Jones 2012-10-18 14:12:44 -07:00
parent 55e8b65aed
commit 5185657010

View File

@ -977,9 +977,10 @@ class Terminal(gtk.VBox):
if gtk.targets_include_text(drag_context.targets) or \
gtk.targets_include_uri(drag_context.targets):
# copy text to destination
txt = selection_data.data.strip()
txt = selection_data.data.strip(' ')
if txt[0:7] == 'file://':
txt = "'%s'" % urllib.unquote(txt[7:])
txt = selection_data.data.strip('\n')
for term in self.terminator.get_target_terms(self):
term.feed(txt)
return