Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Multiline Search & Replace
rickg22:
It seems I've found another "feature". The confirmation dialog is only shown when you select "all". I wonder if this is wise, due to the fact that finding the *FIRST* match might take a while when doing multiline S&R.
But taking that aside, I've managed to complete the algorithm succesfully.
There's a minor problem: Converting the line endings of ALL files to the search expression is completely overkill. It's much better to just convert the search and replace expressions to match the files' EOL mode.
This is easy. Unfortunately, files with mixed line endings might get some matches skipped. I'm afraid there's no easy way around this.
rickg22:
FINISHED!
I've just mailed Jens the patch file for the multiline S&R.
Note that the patch only affects Find-and-Replace (CTRL-R), not Find (CTRL-F).
MortenMacFly:
--- Quote from: rickg22 on November 09, 2009, 07:56:06 am ---The original XRC file had the "Project files" and "Open files" scope swapped.
--- End quote ---
Notice that this was inconsistent. That was modified in a patch lately. So hopefully you left the XRC file untouched and corrected the code (although I was quite sure that I did it already in SVN...?!).
rickg22:
--- Quote from: MortenMacFly on November 09, 2009, 09:43:52 am ---
--- Quote from: rickg22 on November 09, 2009, 07:56:06 am ---The original XRC file had the "Project files" and "Open files" scope swapped.
--- End quote ---
Notice that this was inconsistent. That was modified in a patch lately. So hopefully you left the XRC file untouched and corrected the code (although I was quite sure that I did it already in SVN...?!).
--- End quote ---
At first I thought that I had swapped those lines accidentally while editing the XRC, so I diffed against HEAD. The version in the repository was unfixed. And to fix it... um... no, it was the XRC that I modified. I added like a ton of lines, why not just swap two lines near the end? :P Sorry.
Okay, I modified my local copy to swap again the XRC, and now I fixed the editormanager code to reflect the changes.
Hey, guess what. I still have the SVN authentication. Should I commit to head now?
MortenMacFly:
--- Quote from: rickg22 on November 09, 2009, 02:20:26 pm ---Should I commit to head now?
--- End quote ---
Not head, but the scintilla branch would be fine. :-)
(Unless Jens has serious doubts.)
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version