From 36768f69626e82564c98e6d79cc2e72e7e7405da Mon Sep 17 00:00:00 2001 From: John Schember Date: Fri, 28 Jan 2011 06:07:17 -0500 Subject: [PATCH] GUI: Autocomplete author and tags fix bug were first letter was repeated when completion text ended with a space. --- src/calibre/gui2/widgets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/gui2/widgets.py b/src/calibre/gui2/widgets.py index 41b18aebba..672ea7a3b7 100644 --- a/src/calibre/gui2/widgets.py +++ b/src/calibre/gui2/widgets.py @@ -503,7 +503,7 @@ class CompleteLineEdit(EnLineEdit): cursor_pos = self.cursorPosition() before_text = unicode(self.text())[:cursor_pos] after_text = unicode(self.text())[cursor_pos:] - prefix_len = len(before_text.split(self.separator)[-1].strip()) + prefix_len = len(before_text.split(self.separator)[-1].lstrip()) if self.space_before_sep: complete_text_pat = '%s%s %s %s' len_extra = 3