Typo in snippet trigger makes ebook editor forget the selection

Bug #1713244 reported by Roger on 2017-08-26
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Calibre version: 3.5 64 bits
OS: Windows 8.1

Steps to reproduce:
1 - Open an epub book for edition (i.e. select the book and press "T")
2 - Open the editor preferences (CTRL+P), under "Editor settings" click on "Manage snippets"
3 - Click on "Add snippet" and fill in the fields as bellow, click "Ok" to save the snippet, and return to the editor. Snippet example:
    Name: Emphasis
    Trigger: <e
    Template: <em>${1*}</em>${2}
4 - In the editor, open a file and type "test" without the quotes, select the word "test" and type CTRL+J to use a snippet. The word disappears as it is stashed to be used in the snippet.
5 - Supose you do not have any snippet with a trigger like "<w", then type "<w" whithout the quotes, and press CTRL+J again. An error dialog is raised. Click "Ok".
6 - Correct the trigger you've just mispelled from "<w" to "<e" and press CTRL+J once more. The correct snippet is used bringing the text "<em></em>", but the previously selected word "test" is lost and you will need to type it again.

Expected behaviour:
When the typo is corrected, the selection should not be forgotten. Typing CTRJ+J in step 6 should bring the text "<em>test</em>" with the cursor after the last ">".

Fixed in branch master. The fix will be in the next release. calibre is usually released every alternate Friday.

 status fixreleased

Changed in calibre:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers