mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix completion on a word with a trailing space causing the first letter to be duplicated
This commit is contained in:
parent
05cf89a1f0
commit
5cc32e394d
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user