QSearch plugin

Discuss and announce AkelPad plugins
  • Author
  • Message
DV
Offline
Posts: 1291
Joined: Thu Nov 16, 2006 11:53 am
Location: Kyiv, Ukraine

Re: QSearch plugin

Post by DV »

DV wrote: Sat Nov 16, 2024 3:38 pm
Infocatcher wrote: Sat Nov 16, 2024 12:33 pmBut what about AltGr+Enter? It's better to perform Alt+Enter action instead of nothing.
Seems to be related to this "feature" of Windows:
https://stackoverflow.com/questions/586 ... ent-layout
OK, I've improved handling of AltGr in the QSearch panel by adding the following additional condition:

Code: Select all

isAltPressed = (GetKeyState(VK_MENU) & 0x80) != 0;
isAltGrPressed = isAltPressed && (uMsg != WM_SYSKEYDOWN || (lParam & 0x01000000) != 0); // AltGr emulates Alt+Ctrl
isCtrlPressed = !isAltGrPressed && (GetKeyState(VK_CONTROL) & 0x80) != 0;
I don't know why Microsoft implemented that this way, but obviously it is not possible to differ AltGr from Ctrl+AltGr because AltGr itself emulates Alt+Ctrl.

Anyway, the Hotkeys plugin seems to need the same fix and Instructor may be interested in adding the similar code to the Hotkey plugin.
Because, when I have something assigned to e.g. Ctrl+Alt+F3 in the Hotkeys plugin, pressing AltGr+F3 calls the associated function.

DV
Offline
Posts: 1291
Joined: Thu Nov 16, 2006 11:53 am
Location: Kyiv, Ukraine

Re: QSearch plugin

Post by DV »

QSearch v8.2
+ added: showing "%u of %u matches" when "Auto Count All" is on
+ added: functions GoToNextFindAllMatch and GoToPrevFindAllMatch
- fixed: "Search: Always from beginning" was broken long time ago
* better handling of AltGr (right Alt) in the QSearch panel
* various corrections and improvements around search results highlighting
* various internal improvements
* some unit tests added

Here is how "%u of %u matches" looks (when "Auto Count All" is on):
Image

Here is where "Auto Count All" can be enabled and disabled (right-click the "Find All" button):
Image

Just a reminder, there are two ways to invoke "Find All" from the UI:
Image

Image

DV
Offline
Posts: 1291
Joined: Thu Nov 16, 2006 11:53 am
Location: Kyiv, Ukraine

Re: QSearch plugin

Post by DV »

QSearch v.8.3
* the size of the 64-bit QSearch.dll has been reduced
* improved: the syntax files "qsfndall_*.coder" were slightly updated
* some internal improvements

Offline
Posts: 3234
Joined: Wed Nov 29, 2006 1:19 pm
Location: Киев, Русь
Contact:

Re: QSearch plugin

Post by VladSh »

Люди на смежном форуме просят, чтобы подсветка при вставке текста из буфера в поле поискового запроса также автоматически отрабатывала, как и при наборе любого символа в этом поле. Сам новыми версиями пока не пользуюсь чтобы проверить, но решил оставить это здесь, т.к. в старых и у меня были подобные проблемы - после вставки текста приходилось перевзводить галку "Подсветить всё", чтобы добиться подсветки вставленного слова.

DV
Offline
Posts: 1291
Joined: Thu Nov 16, 2006 11:53 am
Location: Kyiv, Ukraine

Re: QSearch plugin

Post by DV »

VladSh wrote: Wed Dec 18, 2024 1:01 pm чтобы подсветка при вставке текста из буфера в поле поискового запроса также автоматически отрабатывала, как и при наборе любого символа в этом поле
When "Search: On-the-fly mode" is on, should work as requested.
Is there any specific example where it does not work?

Offline
Posts: 3234
Joined: Wed Nov 29, 2006 1:19 pm
Location: Киев, Русь
Contact:

Re: QSearch plugin

Post by VladSh »

DV
destiny_child wrote: "Поиск: Искать "на лету" конечно же включен - иначе бы не работало при вводе символов по одному в поле ввода.
А не работает лишь вставка через буфер и выбор из комбобокса истории поиска.
Ну и куда уж чётче описывать это? Просто CTRL+V из буфера в поле. Или мышкой подцепить и выбрать какое-то
слово из комбобокса предыдущих поисков. Других условий нет.

DV
Offline
Posts: 1291
Joined: Thu Nov 16, 2006 11:53 am
Location: Kyiv, Ukraine

Re: QSearch plugin

Post by DV »

VladSh wrote: Thu Dec 19, 2024 3:18 pmПросто CTRL+V из буфера в поле
Can't reproduce with QSearch v.8.3.
I need his "QSearch.ini", his "AkelPad.ini", his jacket and his glasses.

Offline
Posts: 3234
Joined: Wed Nov 29, 2006 1:19 pm
Location: Киев, Русь
Contact:

Re: QSearch plugin

Post by VladSh »

Ещё один коммент:
volkovysk wrote:Для разраба плагина QSearch ещё объяcню и своими словами.
В тексте главного окна подсветка на лету динамически работает только тогда, когда либо непосредственно посимвольно с клавиатуры(в том числе и виртуальной) вводишь буквы в поле поискового запроса, либо передёргиваешь ЛЮБЫЕ галочки или кнопки на панели плагина, а так же с клавиатуры вставляешь слово посредством CTRL+V.
Во всех остальных вариантах динамики нет. То есть, если в поле поискового запроса вставлять слова посредством МЫШКИ или выбирать слово из выпадающего списка, то действительно подсветка плагина не реагирует на изменившиеся обстоятельства. Галка "Search: On-the-fly mode" тут не помогает.

DV
Offline
Posts: 1291
Joined: Thu Nov 16, 2006 11:53 am
Location: Kyiv, Ukraine

Re: QSearch plugin

Post by DV »

VladSh wrote: Thu Dec 19, 2024 6:58 pmесли в поле поискового запроса вставлять слова посредством МЫШКИ или выбирать слово из выпадающего списка, то действительно подсветка плагина не реагирует на изменившиеся обстоятельства
The search on-the-fly reacts to the keyboard, it does not react to the mouse or drop-down list. In this case, just press F3 or Enter to initiate a new search.

Offline
Posts: 3234
Joined: Wed Nov 29, 2006 1:19 pm
Location: Киев, Русь
Contact:

Re: QSearch plugin

Post by VladSh »

В этом же и суть предложения, - чтобы добавить такую реакцию, иначе неудобно.

DV
Offline
Posts: 1291
Joined: Thu Nov 16, 2006 11:53 am
Location: Kyiv, Ukraine

Re: QSearch plugin

Post by DV »

VladSh wrote: Thu Dec 19, 2024 10:23 pmВ этом же и суть предложения, - чтобы добавить такую реакцию, иначе неудобно.
I've been thinking about that, and I'm rather against these changes.
If QSearch initiated the new search + highlighting each time another item has been selected in the dropdown list, it would lead to some delay (related to the searching, especially with big files and/or when Auto Count All is on), thus causing some UI freeze. Not good.
Regarding the (popup) context menu, I don't even remeber it exists until somebody reminds of it, which rarely happens. So this specific change does not look interesting to me.
On the other hand, if somebody invests their time into this and proposes the changes in the source code, I'll consider them.

DV
Offline
Posts: 1291
Joined: Thu Nov 16, 2006 11:53 am
Location: Kyiv, Ukraine

Re: QSearch plugin

Post by DV »

DV wrote: Sat Dec 21, 2024 2:20 pmRegarding the (popup) context menu, I don't even remeber it exists until somebody reminds of it
To be honest, I don't know how to capture ( create a handler of ) the "Paste" action of the standard context menu.
Simple suggestions of the neural networks (such as ChatGPT) just did not work.
There is an alternative approach of creating own context menu instead of the standard one. But come on! I don't have an intention to create my own context menu instead of the standard one, I'd rather want to attach/capture the existing one.
Post Reply