|
From: Rudi W. <Rud...@we...> - 2003-01-31 09:50:05
|
Hello John, I am astonished, too, about the sophisticated behaviour of the SearchAndReplace feature, and I'm glad that it didn't mischanged my codes until now (at least I didn't notice it) as I'm using ReplaceAll very often. Expanding the SearchAndReplaceDialog with another option which hardly anybody will use doesn't seems a good idea to me. I would prefer a global option. I will try to implement this in the XSearch plugin. I will release this as a compatible version, as soon as 4.1final is out. Kind regards Rudi Message: 5 Reply-To: "John Watson" <jo...@wa...> From: "John Watson" <jo...@wa...> To: "jEdit Devel" <jed...@li...> Subject: Re: [ jEdit-devel ] [ jedit-Bugs-676244 ] Search and replace ignores words depending on capitalization Date: Tue, 28 Jan 2003 21:05:24 -0800 Hmm... my mistake. The docs say: - "String label" would become "String text" - "setLabel" would become "setText" - "DEFAULT_LABEL" would become "DEFAULT_TEXT" So if the text is "foo" and you are replacing it with "BAR", shouldn't it become "bar"? It doesn't, it becomes "BAR". I can understand why it is doing this (at least I think I do). The assumption is that if someone goes to the effort to type caps into the replace string then they must be serious. In other words, the search works as described in the docs iff you type the replace string in all lowercase. I think the root of the problem I'm having with this (and sorry if I'm belaboring a point no one else cares about) is that the "Ignore case" checkbox actually does two things: it does the expected thing (ignore the case of the search string) but it also modifies your replacement string per instance. Consider splitting these two features into two checkboxes... "Ignore case" and "Match target case"? By making the choice explicit it should make the UI less error prone for those of us who only skim the docs and allows the replace to work one way instead of having different behavior depending on the case of the replace string. |