topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • April 20, 2018, 09:28 PM
  • Proudly celebrating 13 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: bug(?): regex alias with a single result generates obstructing scrollbar  (Read 345 times)

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 891
    • View Profile
    • Donate to Member
An unwanted scrollbar appear for regex aliases with only one result. The scrollbar shows only for the first matching character and disappears after the next character.

1.PNG
2.PNG

Reproduce the issue with this alias (temporary disable any other alias with the same regex pattern)

alias:      bar
regex:    ^(ba|bar)$
results:   test | C:\

The issue only occurs for single result aliases. If we update the alias with a second result line then the scrollbar never shows
3.PNG

Tested in FARR v2.233.01 and v2.229.01 in Windows 10. I tested changing some visual settings (disable skin, resize fonts, ...) but the issue persists. I might have missed something though.
« Last Edit: March 25, 2018, 02:38 PM by Nod5 »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 38,422
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Using your alias I can't reproduce the problem, so it could be something unusual..

That weird scrollbar issue can sometime occur if a program gets confused about a previous item being displayed that was wider than their was room for.. I'd appreciate any further experimenting you could do that might give me a clue as to when it happens or doesn't..

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 891
    • View Profile
    • Donate to Member
Ok, I think I've tracked it down now.

The problem
An unwanted scrollbar appears and hides part of the result text only when
(1) the search matches a regex alias and
(2) the regex alias has only one result and
(3) the search before the last entered character had no such one-result regex match

For example with the alias regex ^(b|ba)$ the problem appears for searchstring "b" and disappears when we type the next character to search "ba"

The cause
Resizing the FARR window to have too small width.

The tricky thing though is that the issue doesn't appear directly after resizing. So the user will not directly see any problem with the resize. No unwanted scrollbar is shown even in case (1)(2)(3) above.

Until, that is, the FARR process is restarted. Next time FARR exits it updates the .ini with values that, on next run, will generate the problem. So a user might notice the problem only the next day after Windows has rebooted and FARR restarted.

Reproduce the problem via the GUI: Open FARR. Do a click and drag resize from the bottom right window corner and make the window very small in width (drag it to the left). Exit FARR via the tray menu. Run FARR again. The bug should now appear.

Under the hood the resize to small width makes FARR on next exit update these three keys in the .ini
MainWidth , ResultMode_Width_1 , ResultMode_Height_2

Reproduce the problem by editing FindAndRunRobot.ini
Set these values while FARR is not running
MainWidth=200
ResultMode_Width_1=400
ResultMode_Height_2=200

Solve the problem by editing FindAndRunRobot.ini
Set these values while FARR is not running
MainWidth=400
ResultMode_Width_1=400
ResultMode_Height_2=400

The exact numbers needed might vary depending on what skin and what visual settings the user has.

edit:

These .ini variables also affect the issue.
Code: Text [Select]
  1. CaptionWidth
  2. IconWidth
Set them lower and the value 400 can be set lower without the problem appearing.
« Last Edit: April 18, 2018, 07:40 AM by Nod5 »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 38,422
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Thanks for the detailed instructions, Nod5 -- let me just finish up this work on the upcoming DC fundraiser in April and I will take a shot at this in a couple of days.