diff --git a/src/calibre/gui2/tweak_book/editor/snippets.py b/src/calibre/gui2/tweak_book/editor/snippets.py index e014202613..da4bd07687 100644 --- a/src/calibre/gui2/tweak_book/editor/snippets.py +++ b/src/calibre/gui2/tweak_book/editor/snippets.py @@ -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: