QSearch plugin

Discuss and announce AkelPad plugins
  • Author
  • Message
RDS
Offline
Posts: 1
Joined: Sun Oct 27, 2024 8:06 am

Re: QSearch plugin

Post by RDS »

DV
Приветствую! Можно добавить в плагин такую функцию при поиске?
скрин на примере (Notepad++):
Image
p.s.
Подсказали, нужно в файле настроек QSearch.ini изменить параметры как ниже:
new_ui=2
findall_mode=258

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

Re: QSearch plugin

Post by DV »

RDS wrote: Sun Oct 27, 2024 8:09 amМожно добавить в плагин такую функцию при поиске?
Right-click on the [*] button and then check "Auto Count All":

Image

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

Re: QSearch plugin

Post by DV »

OMG, I seem to need manual testers for QSearch!

QSearch supports the following:
- 3 "find what" types: plain text, special characters, regular expressions.
- 4 search modes: default, match case, whole word, match case + whole word.
- 2 search methods: regular, on-the-fly.
- 3 editor modes: SDI, MDI, PMDI.
- 3 find all outputs: log output, 1 tab file output, N tabs file output.
- 2 count all modes: on, off.
- 2 find next types (in the upcoming QSearch 8.2): regular find next, go to next find all's match.

So, there are 3*4*2*3*3*2*2 = 864 variations of searching!

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

Re: QSearch plugin

Post by DV »

My God, "Search: Always from beginning" was broken long time ago - and no one reported! Probably 864 variations of searching is too much to be handled even by many users :)
(In fact, there are even more variations, since I did not even mention the "Search: Always from beginning" mode, plus there are Find Next and Find Prev, plus there are sequences of commands such as Go To Next/Prev Match from different positions in a file, including unmodified and modified file, combined with Find Next/Prev before and after Go To Match).

Offline
Posts: 1873
Joined: Mon Aug 06, 2007 1:07 pm
Contact:

Re: QSearch plugin

Post by Infocatcher »

DV wrote: Wed Nov 13, 2024 8:49 pm My God, "Search: Always from beginning" was broken long time ago - and no one reported!
Alt+Enter never breaks for me (with my combination of options).
But what about AltGr+Enter? It's better to perform Alt+Enter action instead of nothing.

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

Re: QSearch plugin

Post by DV »

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

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.
Post Reply