Notepad2e icon indicating copy to clipboard operation
Notepad2e copied to clipboard

Flash window on Find wrap-around

Open ProgerXP opened this issue 4 years ago • 4 comments
trafficstars

Inspired by Notepad++: when searching with Don't wrap around disabled, when there was at least one match in the document and the next match (i.e. current match as a result of Find Next/Previous) is the first (Find Next) or last (Find Previous) - do FlashWindow() (or Ex) in such a way that only the window flashes (once), not the taskbar button.

This is intended to supplement the old feature of changing Search toolbar button (I can't find the associated issue, maybe there was none; see n2e_UpdateFindIcon(), n2e_ResetFindIcon()). That turned out to be unusable due to being far off and hard to notice. Flashing happens exactly in the same situations as the button changes so it might be possible to simply amend n2e_UpdateFindIcon().

ProgerXP avatar Oct 28 '21 18:10 ProgerXP

Done. Single window flash added with default cursor blink rate (dwTimeout = 0).

cshnik avatar Nov 05 '21 01:11 cshnik

Additional change: flash window when there is only a single match in the document.

cshnik avatar Nov 05 '21 03:11 cshnik

I see this kind of flashing is totally unnoticeable, neither in Win10 nor in XP. The window title just becomes unfocused for about one second and then reverts. This is especially hard to notice when there is a message box shown before the flash (e.g. "Reached the beginning of the document") because the box causes unfocusing of the main window.

How does it look on your side? Does default flash count make it better?

ProgerXP avatar Nov 06 '21 07:11 ProgerXP

Standard FlashWindow() does the same as current FlashWindowEx() with single blink: FlashWindow1 Another test for 3 flashes with 0.5 default cursor blink rate: FlashWindow2

cshnik avatar Nov 25 '21 00:11 cshnik