Page 2 of 2

Fast Find Enhanced

Posted: Wed 28 Nov, 2018 17:26
by HaRT

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?

Fast Find Enhanced

Posted: Wed 28 Nov, 2018 17:47
by DrKnS
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?

Fast Find Enhanced

Posted: Wed 28 Nov, 2018 18:44
by saiberpink
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?

Fast Find Enhanced

Posted: Wed 28 Nov, 2018 20:14
by PavelR
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.)

Fast Find Enhanced

Posted: Wed 28 Nov, 2018 22:53
by DrKnS
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.

Fast Find Enhanced

Posted: Thu 29 Nov, 2018 00:40
by DrKnS
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]...

Fast Find Enhanced

Posted: Thu 29 Nov, 2018 10:52
by PavelR
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!

Fast Find Enhanced

Posted: Thu 29 Nov, 2018 15:05
by saiberpink
@DrKnS oh, I hereby bow to you, dear sir. I've never expected you to fix external issues =) Thanks much.

Fast Find Enhanced

Posted: Mon 17 Dec, 2018 11:08
by saiberpink
I've just updated Far to 3.0.5343 x64, win10;
it worked on friday. sorry to bother again, still - any ideas? :)

Fast Find Enhanced

Posted: Mon 17 Dec, 2018 11:21
by HaRT
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].

Fast Find Enhanced

Posted: Mon 17 Dec, 2018 11:27
by Shmuel
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.

Fast Find Enhanced

Posted: Mon 17 Dec, 2018 11:36
by saiberpink
@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 }                                                                       ║
╚═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝

Fast Find Enhanced

Posted: Mon 17 Dec, 2018 11:37
by saiberpink

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 }                                                                      ║
 ╚═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝

Fast Find Enhanced

Posted: Mon 17 Dec, 2018 11:41
by DrKnS
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

Fast Find Enhanced

Posted: Mon 17 Dec, 2018 11:49
by HaRT

Fast Find Enhanced

Posted: Mon 17 Dec, 2018 12:09
by DrKnS

Fast Find Enhanced

Posted: Mon 17 Dec, 2018 12:36
by saiberpink
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!