Recent

Author Topic: Changes in "Search Results" window  (Read 2863 times)

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9209
  • Debugger - SynEdit - and more
    • wiki
Re: Changes in "Search Results" window
« Reply #30 on: June 05, 2023, 10:06:40 pm »
Code: Pascal  [Select][+][-]
  1. inc(lTextX, lTree.Canvas.GetTextWidth(aText) + 1);
I added this because I noticed in some cases that the letters overlap each other by one pixel (in Windows 7/8.1). Maybe it's a font smoothing issue.
Yes letters can overlap.

Same here: https://forum.lazarus.freepascal.org/index.php/topic,63528.0.html
But I pixel counted, the distance was correct.

It's a feature...

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4346
  • I like bugs.
Re: Changes in "Search Results" window
« Reply #31 on: June 05, 2023, 10:14:07 pm »
I applied the latest patch. Nice!
This is a fortunate situation that people compete to improve the same code. It works when the goals are more or less the same.
With many parts of Lazarus code the opposite is true: nobody seems to care.
I think the Find in Files feature is important and used by many people, including myself.
« Last Edit: June 06, 2023, 08:09:44 am by JuhaManninen »
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

BrunoK

  • Sr. Member
  • ****
  • Posts: 446
  • Retired programmer
Re: Changes in "Search Results" window
« Reply #32 on: June 06, 2023, 12:22:16 pm »
Using GIT (I have Turtoise git) how do I upfdate my working version with the git repository files ?

SVN and Mantis where definitely much better !

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9209
  • Debugger - SynEdit - and more
    • wiki
Re: Changes in "Search Results" window
« Reply #33 on: June 06, 2023, 01:44:47 pm »
Using GIT (I have Turtoise git) how do I upfdate my working version with the git repository files ?

SVN and Mantis where definitely much better !

"svn up" is "git pull" and tortoise does have that too.
If you have local changes, first to "git stash" then after "git stash pop" (again also avail in Tortoise)

That all assumes, that your "working version" is a "git clone" / like it used to have to be an "svn checkout" before.

https://wiki.freepascal.org/SVN_to_GIT_Cheatsheet
https://wiki.freepascal.org/FPC_git

Also see FpcUPDeluxe

n7800

  • New Member
  • *
  • Posts: 38
Re: Changes in "Search Results" window
« Reply #34 on: June 07, 2023, 12:46:58 am »

avra

  • Hero Member
  • *****
  • Posts: 2463
    • Additional info
Re: Changes in "Search Results" window
« Reply #35 on: June 07, 2023, 10:56:02 am »
I will also improve the filter - it will be possible to filter not only text, but also files and paths. But I'll deal with that a bit later.
In my 2 cents imagination I see 2 edit fields - one include filter and one exclude filter. Filtering keywords in edit field are separated by spaces, and when complex they can be put in quotes. Edit fields can be permanent or shown only after pressing "+" and/or "-" captioned buttons. And filter is live and incremental.

Please don't shoot me for dreaming big without having my own hands dirty  ;)

EDIT: Ah yes, and to avoid edit fields overload, if filtering keyword in edit field is prefixed with some character then keyword applies to directories. Even further reduction could be to have a single edit field for both include and exclude filters and to have "+" prefix for include filter, "++" filter for dir/file include filter, and "-" and "--" prefixes for exclude filter. No prefix at all as default could be the same as "-" filter. Raise your hand everybody still able to follow  :D
« Last Edit: June 07, 2023, 11:09:36 am by avra »
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9209
  • Debugger - SynEdit - and more
    • wiki
Re: Changes in "Search Results" window
« Reply #36 on: June 07, 2023, 02:44:27 pm »
I will also improve the filter - it will be possible to filter not only text, but also files and paths. But I'll deal with that a bit later.
In my 2 cents imagination I see 2 edit fields
Replies moved to https://forum.lazarus.freepascal.org/index.php/topic,63599.0.html

n7800

  • New Member
  • *
  • Posts: 38
Re: Changes in "Search Results" window
« Reply #37 on: June 07, 2023, 07:25:10 pm »
Quote
That's why I like the status bar suggestion. In addition, it can display a lot of additional information. For example, it is better to display the number of results there, and not in the tab title. You can also show the number of filtered items there, etc.
Quote
It could be in the Windows title bar. Though that is "unconventional", statusbar (if added) would be the place.
Anyway, this may work for some, it wont work for me. Just to far to look. If it is in the search result, it is right there.
Also title bar may be awkward in a docked ide.
Quote
Example : search for FindInFilesDlg in your 2.2.x folder and then in your 2.3 (trunk) folder. One gets no clue of where the search string was found. Annoying.

I am planning to add a status bar. It will include the following information:
  • search path if the search was done in a folder, else word "active file", "all open files" or "project files"
  • search mask (maybe)
  • search options (regular expressions, case sensitive, whole word, multiline search) - in the form of letters
  • number of items to display (not filtered)
  • total number of elements
This panel will be informative, while taking up little space. I don't think there is an option to hide it.

Just like in the attached image.
« Last Edit: June 07, 2023, 07:28:40 pm by n7800 »

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4346
  • I like bugs.
Re: Changes in "Search Results" window
« Reply #38 on: June 20, 2023, 06:44:53 pm »
  • number of items to display (not filtered)
  • total number of elements
What is the difference between those?
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

n7800

  • New Member
  • *
  • Posts: 38
Re: Changes in "Search Results" window
« Reply #39 on: June 20, 2023, 07:39:41 pm »
"total number of elements" - number of results returned after searching files
"number of items to display" - the number of results left in the window after applying the filter (if the user entered something in it)

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4346
  • I like bugs.
Re: Changes in "Search Results" window
« Reply #40 on: June 20, 2023, 09:07:47 pm »
Ah, OK.
I think it will be a good addition, too.
Still it cannot fully replace the number "(123)" of items in a tab captions which are all visible at once.
They are complementary.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

n7800

  • New Member
  • *
  • Posts: 38
Re: Changes in "Search Results" window
« Reply #41 on: June 20, 2023, 09:22:20 pm »
Understand, I do not mind this number in every tab, however, this is just additional information that is rarely needed. It will still remain a window, just in a different place.
Sometimes I also need it, for example, to make sure after the changes made that the number has become one less. I press [F5] and look at it.
Just wondering why they are needed all at once?

 

TinyPortal © 2005-2018