GUI: Autocomplete author and tags fix bug were first letter was repeated when completion text ended with a space.

This commit is contained in:
John Schember 2011-01-28 06:07:17 -05:00
parent 1d6712cb53
commit 36768f6962

View File

@ -503,7 +503,7 @@ class CompleteLineEdit(EnLineEdit):
cursor_pos = self.cursorPosition() cursor_pos = self.cursorPosition()
before_text = unicode(self.text())[:cursor_pos] before_text = unicode(self.text())[:cursor_pos]
after_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: if self.space_before_sep:
complete_text_pat = '%s%s %s %s' complete_text_pat = '%s%s %s %s'
len_extra = 3 len_extra = 3