Skip to content
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

Viewer now uses the standard Search dialog. #622

Merged
merged 1 commit into from
Feb 1, 2023

Conversation

MKadaner
Copy link
Contributor

@MKadaner MKadaner commented Jan 30, 2023

Summary

This is it: Viewer now uses the standard Search dialog. No changes in behavior are expected except for the two removed features (see Details).

References

Checklist

  • I have followed the contributing guidelines.
  • I have discussed this with project maintainers: See References above.

    If not checked, I accept that this work might be rejected in favor of another great big ineffable plan.

Details

Also removed:

  • Opening Viewer Search dialog on typing the first character of the search pattern.
  • Search dialog auto-focus feature. We discussed it somewhere, but I could not find the place.

What else did I forget to remove?

@MKadaner
Copy link
Contributor Author

@rohitab, It would be great if you could test this change. The most interesting things to test are search for Hex in Viewer and saving / restoring dialog settings across searches and Viewer / Editor instances. In both cases no regressions are expected, but I did not attempt to address any known bugs / issues in these areas.

@rohitab
Copy link
Contributor

rohitab commented Jan 30, 2023

Sure, I will test it out. Might not be able to get to it until tomorrow though, but I'll definitely try.

@MKadaner
Copy link
Contributor Author

Thank you! No rush at all.

@MKadaner MKadaner force-pushed the mzk-viewer-search-std branch from 224b053 to 8e932ca Compare January 31, 2023 05:08
@MKadaner
Copy link
Contributor Author

Thank you.

Changelog / version / rebased / squashed / ready.

@rohitab
Copy link
Contributor

rohitab commented Jan 31, 2023

@MKadaner I just tested your changes and everything appears to be working fine. I did not find any issues with the search.

Since you removed Viewer.SearchEditFocus, do you think it should be removed from the macro testing code as well?

"Viewer.SaveViewerWrapMode", "boolean",
"Viewer.SearchEditFocus", "boolean",
"Viewer.SearchRegexp", "boolean",

Right now, it won't make a difference since the code to test the configuration is commented out.

-- test_Far_GetConfig()

It's most likely commented since there are a lot of other left over settings that were never removed, and some settings where the type changed. Examples include Dialog.EditHistory, Interface.ShiftsKeyRules and Interface.ClearType. The test_Far_GetConfig function fails even in previous versions due to this.

@MKadaner MKadaner force-pushed the mzk-viewer-search-std branch from 8e932ca to f022952 Compare January 31, 2023 05:52
@MKadaner
Copy link
Contributor Author

Thank you for testing, @rohitab, and for discovering macrotest.lua. Frankly, I do not know what I should do with it. For now, I commented Viewer.SearchEditFocus out of the test. Tagging @alabuzhev to weigh in.

@alabuzhev
Copy link
Contributor

macrotest.lua runs during CI.
If some parameters no longer exist please remove them from the test.

@MKadaner
Copy link
Contributor Author

MKadaner commented Feb 1, 2023

As Rohitab noted, Far config test was commented out six years ago (even though macrotest.lua is still executed):

-- test_Far_GetConfig()

I am not sure what is the value of this test, but let me fix it in a separate PR. It has nothing to do with Viewer Search. I created a bug to track this issue. You can assign it to me.

@alabuzhev alabuzhev merged commit a4a8315 into FarGroup:master Feb 1, 2023
@MKadaner MKadaner deleted the mzk-viewer-search-std branch February 2, 2023 04:20
@MKadaner
Copy link
Contributor Author

MKadaner commented Feb 2, 2023

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants