GNOME Bugzilla – Bug 768812
editor-frame: Add squiggly underlines for invalid regex
Last modified: 2016-07-14 18:56:01 UTC
.
Created attachment 331515 [details] [review] editor-frame: Move the logic for enabling/disabling replace actions There are many different conditions that determine whether Replace or Replace All operations would make sense, so similar logic needs to be run in many callbacks to try to ensure the buttons' sensitivity reflects the state of the search. This commit centralizes that logic into update_replace_actions_sensitivity() which makes the code more maintainable.
Created attachment 331516 [details] [review] editor-frame: Add squiggly underlines for invalid regex When an invalid regex is entered in the search entry field, it's difficult for the user to tell if there's an issue with their input or if the search genuinely returned no results. This commit addresses that ambiguity by adding a wavy underline when an invalid regular expression is entered in the search field, or an invalid replacement string is entered in the replace field (which can contain backreferences). The color white is used so that it can still be seen when the background is red (which happens when a search returns no results).
Review of attachment 331515 [details] [review]: LGTM, nice work
Review of attachment 331516 [details] [review]: Cool!
Pushed as commit 302278e573f667d6f10c67f09644a3f1a670f276 and commit e8d39eeabb9f940f2e5aa2003b8021470bfc6255