| Summary: | Captures seemingly not allowed in pattern string [GrepView GUI Madness] | ||
|---|---|---|---|
| Product: | [Applications] kdevelop | Reporter: | Albert Zeyer <albzey> |
| Component: | All editors | Assignee: | kdevelop-bugs-null |
| Status: | CONFIRMED --- | ||
| Severity: | normal | CC: | julien.desgats, kde, kfunk |
| Priority: | NOR | ||
| Version First Reported In: | 4.6.0 | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Albert Zeyer
2014-08-03 15:35:51 UTC
odd, this was explicitly disabled by commit commit 5bb9829c377f80b6e1e96e8fcd90f918f83ecf44 Author: Julien Desgats <julien.desgats@gmail.com> Date: Mon Oct 25 16:44:21 2010 +0200 Added a replacement template The commit message doesn't really tell much about *why* this was done though. Julien, do you remember anything about that? ok, this thing GUI horribly complicated - we should try to simplify it in the future. I'll leave this bug open to remind us about it. As a workaround, you have to do the following: Pattern: .* Template: \((%s)->flags \& SDL_SRCCOLORKEY\) Replacement Template: Surface_HasColorKey(\1) afaik that should do the trick. Some notes: Pattern is not actually the pattern :) It's just a part that will be put into the pattern _template_, i.e. %s in the "template" will be replaced by the "pattern". The template *can* contain captures, but not the pattern... And to make things worse: the pattern must not be empty :-/ The "replacement template" can contain capture references and will be used to replace all matches. It can contain a %s which will be replaced by the "Replacment Text", which - again - must not be empty (ugh)... Sorry for the mess, we'll try to improve this in the future. Thank you for the bug report. As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists. If this bug is no longer persisting or relevant please change the status to resolved. Still a concern, just fought with this, and it being a spearate modal dialog does not help with quickly iterating so this does what I actually want. Most editors, shows the search/replace in the main window. In general the template buisness is just to confusing, no normal user can understand it, the manual doesnt mention it and if it was not for milians comments here I dont know if we had any documentation at all. Maybe the best would just to take a step back and be inspired what Kate has or just reuse it. |