-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Find and Replace dialog fixes #274
Find and Replace dialog fixes #274
Conversation
It looks better, especially on a high DPI screen
The result was a corrupted text
@@ -494,10 +494,6 @@ private void InitializeComponent() | |||
this.aboutSWQLStudioToolStripMenuItem.Text = "About SWQL Studio"; | |||
this.aboutSWQLStudioToolStripMenuItem.Click += new System.EventHandler(this.aboutSWQLStudioToolStripMenuItem_Click); | |||
// | |||
// openFileDialog | |||
// | |||
this.openFileDialog.FileName = "openFileDialog1"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really related to the "Find and Replace" dialog, but why not fix it anyway.
@@ -1080,7 +1073,7 @@ private CharacterRange ReplaceNext(bool searchUp) | |||
if (rdoRegexR.Checked) | |||
{ | |||
rr = new Regex(txtFindR.Text, GetRegexOptions()); | |||
string selRangeText = Scintilla.GetTextRange(selRange.cpMin, selRange.cpMax - selRange.cpMin + 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Example of bad replace:
- query:
abc
- search for regex:
b
- replace with:
d
- result was:
adcc
The dialog contains surprisingly lot of duplicated or unfinished code and copy-paste issues. This PR should fix the ones I encountered. What are the plans for the whole "ScintillaNET-FindReplaceDialog" component? Do only as few changes as possible? Delete everything we don't use (IncrementalSearch, FindAllResults, GoTo)? Refactor the code we use to simplify it? Are changes like this even OK, considering it's a 3rd-party code? |
Changes are available for testing in build 3.0.0.312 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for cleaning this up. Since we have copied this code into this project (can't remember who added this feature), we should fix problems like this.
A bunch of fixes for issues in the "Find and Replace" dialog. One commit per issue.