cogentcore / cogent

A powerful, fast, elegant software ecosystem for all platforms.
https://cogentcore.org/cogent
BSD 3-Clause "New" or "Revised" License
192 stars 10 forks source link

Replace (find panel) ignoring case of replacement text #245

Open rohrlich opened 4 years ago

rohrlich commented 4 years ago

Ignore should only apply to the find and not the replace.

Try this for example in ra25.go

Likewise if you use AlphaCyc for find and alPha for replacement the result is Alpha

Now get this!! I entered "Learning Phonemes" for find and "Sensitivity to Sequential Probabilities" for replace and got "SensitiviTy to sequential Probabilities". Notice that the replace has uppercased the 10th character 'T' while in the find it is the 10th character 'P' that is uppercase!!

rcoreilly commented 4 years ago

Yep it is using "MatchCase" when Ignore is used -- this works great most of the time, and is what emacs does for example. Could maybe be made smarter though in terms of treating caps after space as a special case and matching that in the replacement.

rohrlich commented 4 years ago

Ok, well you can decide if you want to close this. Easy enough to uncheck ignore case for particular replace cases.