Fast Find Enhanced

Here you can discuss about your favorite plug-in.
User avatar
HaRT
Moderator
Posts: 9159
Joined: Tue 30 Aug, 2005 17:21
Location: Санкт-Петербург
Has thanked: 90 times
Been thanked: 174 times

Fast Find Enhanced

Post by HaRT » Wed 28 Nov, 2018 17:26

Latest post of the previous page:

DrKnS wrote:
Wed 28 Nov, 2018 17:04
If you use Windows 10 you don't want to use "ClearType friendly redraw".
It's a workaround for a problem that has been properly fixed there and it will give you nothing but a slowdown.
Wouldn't it be nice to disable and disregard this option in Win10 and newer?
Фар есть инструмент, а не нянька. © 2009 DrKnS

User avatar
DrKnS
Posts: 5430
Joined: Thu 04 Aug, 2005 06:44
Location: Kyiv
Has thanked: 6 times
Been thanked: 251 times

Fast Find Enhanced

Post by DrKnS » Wed 28 Nov, 2018 17:47

saiberpink, PavelR
This could be a plugin bug or a new renderer bug.
I can look into it, but I can't reproduce it - it works just fine with any combination of the mentioned options.
Could you provide more details please?
HaRT wrote:
Wed 28 Nov, 2018 17:26
Wouldn't it be nice to disable and disregard this option in Win10 and newer?
Yes, but I have no idea in which exacly Windows 10 they fixed their fonts, and I don't want to install every single released build to find out.

Or, taking into account their new forced updates policy, we can assume that no one is using outated builds and just check the major version?

saiberpink
Posts: 13
Joined: Mon 13 Aug, 2018 10:17
Has thanked: 4 times

Fast Find Enhanced

Post by saiberpink » Wed 28 Nov, 2018 18:44

DrKnS wrote:
Wed 28 Nov, 2018 17:47
Could you provide more details please?
@DrKnS I'd be very happy to tell you more, but I feel I've just told all I found to this minute. Is there anything specific that would help?

PavelR
Posts: 18
Joined: Wed 07 Jan, 2009 17:29
Location: Hradec Kralove, Czech Republic
Contact:

Fast Find Enhanced

Post by PavelR » Wed 28 Nov, 2018 20:14

DrKnS wrote:
Wed 28 Nov, 2018 17:47
saiberpink, PavelR
This could be a plugin bug or a new renderer bug.
I can look into it, but I can't reproduce it - it works just fine with any combination of the mentioned options.
Could you provide more details please?
I've reproduced it on Windows 10 Pro (10.0.17134.286) by extracting x64 version of Far 5328 from 7Z distribution and Plugin from plugring - https://plugring.farmanager.com/plugin.php?pid=927&l=en 1.0.0.5, Far Settings - Virtual Terminal: Checked, ClearType: Checked. Plugin option: Input dialogue on the bottom; then changed directory to Far program directory, placed cursor on top, sort panel by name; then pressed ALT for fast find and by typing letters: "f" "a" "r" "r" the cursor is moved to currently best match and if the cursor is moved then lines are messed up as in the screenshot attached to message "by saiberpink » Tue 27 Nov, 2018 16:31".
If the ClearType is unchecked the only problem is in formatting of found files count.
If the VirtualTerminal is unchecked there is no problem at all.
Windows 7 does not exhibit the problem.
I hope it is clearer now how to get the behavior. (FYI: It does not bother me - I do not use regularly Windows 10 and do not need to have Virtual Terminal checked, but it was interesting to me that I was wondered if I can get the same behavior as saiberpink and yes I can.)

User avatar
DrKnS
Posts: 5430
Joined: Thu 04 Aug, 2005 06:44
Location: Kyiv
Has thanked: 6 times
Been thanked: 251 times

Fast Find Enhanced

Post by DrKnS » Wed 28 Nov, 2018 22:53

Ok, I've managed to reproduce it - it's definitely a plugin bug.
The author wanted to display those counters in green, but instead of using a proper "2" ("00000010" in binary) index for that he for some reason used "34" ("00100010" in binary).
When "Virtual Terminal" is unchecked, we just pass those colours as is to Windows, and it looks like Windows decomposes them to separate bits, drops all invalid ones and eventually it gets as green as planned.
When "Virtual Terminal" is checked, we need to transform the colour index because the VT palette is totally different. We use a lookup table for that and naively expected that all indices will be in range. The table size is 8, so that "34" index pointed somewhere into outer space.

I've added bounds checking to 5331, it should be ok now.

User avatar
DrKnS
Posts: 5430
Joined: Thu 04 Aug, 2005 06:44
Location: Kyiv
Has thanked: 6 times
Been thanked: 251 times

Fast Find Enhanced

Post by DrKnS » Thu 29 Nov, 2018 00:40

DrKnS wrote:
Wed 28 Nov, 2018 22:53
he for some reason used "34"
The bug is here:
  1. if (param1==3) then param2[1].ForegroundColor = far.Colors.COL_DIALOGLISTSELECTEDHIGHLIGHT; return param2; end
  2. if (param1==4) then param2[1].ForegroundColor = far.Colors.COL_DIALOGLISTSELECTEDHIGHLIGHT; return param2; end
COL_DIALOGLISTSELECTEDHIGHLIGHT is an index, it can't be used directly.
Presumably it should be something like this instead:
  1. colors = far.AdvControl("ACTL_GETARRAYCOLOR")
  2. ...param2[1] = colors[far.Colors.COL_DIALOGLISTSELECTEDHIGHLIGHT]...

PavelR
Posts: 18
Joined: Wed 07 Jan, 2009 17:29
Location: Hradec Kralove, Czech Republic
Contact:

Fast Find Enhanced

Post by PavelR » Thu 29 Nov, 2018 10:52

DrKnS wrote:
Wed 28 Nov, 2018 22:53
Ok, I've managed to reproduce it - it's definitely a plugin bug.
The author wanted to display those counters in green, but instead of using a proper "2" ("00000010" in binary) index for that he for some reason used "34" ("00100010" in binary).
When "Virtual Terminal" is unchecked, we just pass those colours as is to Windows, and it looks like Windows decomposes them to separate bits, drops all invalid ones and eventually it gets as green as planned.
When "Virtual Terminal" is checked, we need to transform the colour index because the VT palette is totally different. We use a lookup table for that and naively expected that all indices will be in range. The table size is 8, so that "34" index pointed somewhere into outer space.

I've added bounds checking to 5331, it should be ok now.
What a prompt solution of bug in other programmer code ;-) Thank you.
I can confirm that 5331 do not save ClearType checked state and FastFind works fine regardless of Virtual Terminal settings (on my computer with Win 10).
Thumbs up!
Last edited by PavelR on Thu 29 Nov, 2018 10:53, edited 1 time in total.

saiberpink
Posts: 13
Joined: Mon 13 Aug, 2018 10:17
Has thanked: 4 times

Fast Find Enhanced

Post by saiberpink » Thu 29 Nov, 2018 15:05

@DrKnS oh, I hereby bow to you, dear sir. I've never expected you to fix external issues =) Thanks much.

saiberpink
Posts: 13
Joined: Mon 13 Aug, 2018 10:17
Has thanked: 4 times

Fast Find Enhanced

Post by saiberpink » Mon 17 Dec, 2018 11:08

I've just updated Far to 3.0.5343 x64, win10;
it worked on friday. sorry to bother again, still - any ideas? :)
Attachments
1.jpg

User avatar
HaRT
Moderator
Posts: 9159
Joined: Tue 30 Aug, 2005 17:21
Location: Санкт-Петербург
Has thanked: 90 times
Been thanked: 174 times

Fast Find Enhanced

Post by HaRT » Mon 17 Dec, 2018 11:21

saiberpink, for search's sake, please take a text “screenshot” of the error box (using Far's screen grabber by AltIns or console's built-in Edit|Mark–Copy functionality) and paste it here enclosed in [code][/code].
Фар есть инструмент, а не нянька. © 2009 DrKnS

Shmuel
Posts: 5923
Joined: Thu 23 Mar, 2006 21:36
Location: Israel
Has thanked: 23 times
Been thanked: 233 times

Fast Find Enhanced

Post by Shmuel » Mon 17 Dec, 2018 11:27

saiberpink, this time the error is due to change in luafar3.dll (not in Far.exe). I will look into it.

Update:
In the plugin's file ffind.lua, find 2 occurences of FST_DATA and replace them with "FST_DATA".
Then reload Far.
Last edited by Shmuel on Mon 17 Dec, 2018 11:38, edited 1 time in total.

saiberpink
Posts: 13
Joined: Mon 13 Aug, 2018 10:17
Has thanked: 4 times

Fast Find Enhanced

Post by saiberpink » Mon 17 Dec, 2018 11:36

@hart I didn't know. sorry!

Code: Select all

╔══════════════════════════════════════════════════════════════════════ Error ══════════════════════════════════════════════════════════════════════╗
║ C:\Users\cyberphobia\Desktop\FarC\plugins\FastFind Enhanced\FastFind Enhanced-x64.dll:                                                            ║
║ ...rphobia\Desktop\FarC\plugins\FastFind Enhanced\ffind.lua:394: bad argument #3 to 'Get' (invalid flag)                                          ║
║ stack traceback:                                                                                                                                  ║
║    [C]: in function 'Get'                                                                                                                         ║
║    ...rphobia\Desktop\FarC\plugins\FastFind Enhanced\ffind.lua:394: in function 'get_lines_per_column'                                            ║
║    ...rphobia\Desktop\FarC\plugins\FastFind Enhanced\ffind.lua:446: in function 'calc_new_panel_top_item'                                         ║
║    ...rphobia\Desktop\FarC\plugins\FastFind Enhanced\ffind.lua:595: in function <...rphobia\Desktop\FarC\plugins\FastFind Enhanced\ffind.lua:507> ║
║    [C]: in function 'DialogRun'                                                                                                                   ║
║    ...top\FarC\plugins\FastFind Enhanced\FastFind Enhanced.lua:65: in function <...top\FarC\plugins\FastFind Enhanced\FastFind Enhanced.lua:37>   ║
╟───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║                                                                      { OK }                                                                       ║
╚═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝

saiberpink
Posts: 13
Joined: Mon 13 Aug, 2018 10:17
Has thanked: 4 times

Fast Find Enhanced

Post by saiberpink » Mon 17 Dec, 2018 11:37

Code: Select all


 ╔═════════════════════════════════════════════════════════════════════ Error ═════════════════════════════════════════════════════════════════════╗
 ║ C:\Users\cyberphobia\Desktop\FarC\plugins\FastFind Enhanced\FastFind Enhanced-x64.dll:                                                          ║
 ║ ...top\FarC\plugins\FastFind Enhanced\FastFind Enhanced.lua:65: error occured in dialog procedure                                               ║
 ║ stack traceback:                                                                                                                                ║
 ║    [C]: in function 'DialogRun'                                                                                                                 ║
 ║    ...top\FarC\plugins\FastFind Enhanced\FastFind Enhanced.lua:65: in function <...top\FarC\plugins\FastFind Enhanced\FastFind Enhanced.lua:37> ║
 ╟─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
 ║                                                                     { OK }                                                                      ║
 ╚═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝

User avatar
DrKnS
Posts: 5430
Joined: Thu 04 Aug, 2005 06:44
Location: Kyiv
Has thanked: 6 times
Been thanked: 251 times

Fast Find Enhanced

Post by DrKnS » Mon 17 Dec, 2018 11:41

HaRT wrote:
Mon 17 Dec, 2018 11:21
using Far's screen grabber by AltIns or console's built-in Edit|Mark–Copy functionality
Or Ctrl+C

User avatar
HaRT
Moderator
Posts: 9159
Joined: Tue 30 Aug, 2005 17:21
Location: Санкт-Петербург
Has thanked: 90 times
Been thanked: 174 times

Fast Find Enhanced

Post by HaRT » Mon 17 Dec, 2018 11:49

Фар есть инструмент, а не нянька. © 2009 DrKnS

User avatar
DrKnS
Posts: 5430
Joined: Thu 04 Aug, 2005 06:44
Location: Kyiv
Has thanked: 6 times
Been thanked: 251 times

Fast Find Enhanced

Post by DrKnS » Mon 17 Dec, 2018 12:09


saiberpink
Posts: 13
Joined: Mon 13 Aug, 2018 10:17
Has thanked: 4 times

Fast Find Enhanced

Post by saiberpink » Mon 17 Dec, 2018 12:36

Shmuel wrote:
Mon 17 Dec, 2018 11:27
In the plugin's file ffind.lua, find 2 occurences of FST_DATA and replace them with "FST_DATA".
Then reload Far.
works. thank you!

Post Reply

Return to “General Plug-In Discussions”