[kupfer: 4/4] plugin.commands: Reject multiline text



commit fa5c8a06b7864b763e0b13a52c6fb74db8e6c51c
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date:   Sat Nov 14 00:37:18 2009 +0100

    plugin.commands: Reject multiline text

 kupfer/plugin/commands.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/kupfer/plugin/commands.py b/kupfer/plugin/commands.py
index 6a76260..9bdec41 100644
--- a/kupfer/plugin/commands.py
+++ b/kupfer/plugin/commands.py
@@ -41,6 +41,8 @@ class CommandTextSource (TextSource):
 	def get_items(self, text):
 		if not text.strip():
 			return
+		if len(text.splitlines()) > 1:
+			return
 		firstword = text.split()[0]
 		# iterate over $PATH directories
 		PATH = os.environ.get("PATH") or os.defpath



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]