DistributedProofreaders / guiguts-py

Guiguts rewrite using Python/tkinter
GNU General Public License v2.0
2 stars 7 forks source link

Search->Search & Replace->In Selection #397

Closed okrick closed 4 weeks ago

okrick commented 4 weeks ago

When 'In Selection' is selected and there's no text currently selected, the 'Count,' 'Find All,' and 'Replace All' functions behave as expected, indicating that nothing is selected.

However, the 'Search' and 'Replace & Search' buttons can still find the next occurrence of the search term.

I'm unsure if this is a potential bug or a known feature to be documented in the GG2 manual.

srjfoo commented 4 weeks ago

I don't know about Notepad++, but BBEdit handles this by disabling the "in selection" checkbox if there's no active selection. I suspect that everything should work the same. That is, if there is no active selection, "Search" and "Replace & Search" should also not find anything.

windymilla commented 4 weeks ago

That's deliberate - the layout of the dialog is intended to indicate that the "In Selection" applies to the buttons in that section of the dialog (Count, Find All, Replace All)

"In Selection" has no effect on the other buttons - this is how Notepad++ behaves.