View Single Post
Old 04-18-2024, 04:59 PM   #1
lomkiri
Zealot
lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.
 
lomkiri's Avatar
 
Posts: 136
Karma: 1000102
Join Date: Jul 2021
Device: N/A
[Feature req] Regex-function editor : Confirmation before exit

TL;DR :
Would it be possible to add a warning when exiting the regex-function editor (on "esc" key) when the state of the editor is "dirty" ?

This dialog could have a checkbox "Ask next time" so if it perturbs someone, it's easy to get rid of it.

Tip : I use vim so it became a reflex for me to use "esc" before any operation.

=========
Why I' asking this :

Regex-function is a powerful recourse. I use it a lot. I'm even working on a plugin (together with a friend) that uses them quite a few (to be published in some months).

When the code of the function is not trivial, I write it in vim, then I copy it in the function-editor of calibre. When I modify it in the function-editor to correct typos or bugs, I often use, by mistake, "esc", that in vim restores the "normal-mode". But, in calibre, ... it exits the modified function without warning and without saving, so I loose all the modifications (sometime extensive).

TIA
lomkiri is offline   Reply With Quote