Implemented heurisitc on multiline paste

This commit is contained in:
Tarcisio Fedrizzi 2016-02-23 07:52:45 +01:00
parent 48f87d1656
commit 4aa7649c0a

View File

@ -820,8 +820,10 @@ class CommandDispatcher:
raise cmdexc.CommandError("{} is empty.".format(target)) raise cmdexc.CommandError("{} is empty.".format(target))
log.misc.debug("{} contained: '{}'".format(target, log.misc.debug("{} contained: '{}'".format(target,
text.replace('\n', '\\n'))) text.replace('\n', '\\n')))
text_urls = enumerate(u for u in text.split('\n') if u.strip()) text_urls = [u for u in text.split('\n') if u.strip()]
for i, text_url in text_urls: if len(text_urls) > 1 and not urlutils.is_url(text_urls[0]):
text_urls = [text]
for i, text_url in enumerate(text_urls):
if not window and i > 0: if not window and i > 0:
tab = False tab = False
bg = True bg = True