mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Editor snippets: Dont lose the last selected word when the user triggers a non-existent snippet. Fixes #1713244 [Typo in snippet trigger makes ebook editor forget the selection](https://bugs.launchpad.net/calibre/+bug/1713244)
This commit is contained in:
parent
2b92691c68
commit
525510e53d
@ -421,6 +421,7 @@ class SnippetManager(QObject):
|
||||
if snip is None:
|
||||
error_dialog(self.parent(), _('No snippet found'), _(
|
||||
'No matching snippet was found'), show=True)
|
||||
self.last_selected_text = self.last_selected_text or lst
|
||||
return True
|
||||
template = expand_template(editor, trigger, snip['template'])
|
||||
if template.has_tab_stops:
|
||||
|
Loading…
x
Reference in New Issue
Block a user