Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: show bookmarks in search results. #8099

Open
cslemmen opened this issue Apr 9, 2020 · 9 comments
Open

Feature Request: show bookmarks in search results. #8099

cslemmen opened this issue Apr 9, 2020 · 9 comments

Comments

@cslemmen
Copy link

cslemmen commented Apr 9, 2020

Description of the Issue

In the search results panel line numbers are shown along with the line's text but not also a bookmark if it is set. There is (typically) a blank area to the left of the "Line #" text that could show the bookmark bullet/icon. I feel this would be helpful in a number of cases EG: alerting you that something you searched for already has been bookmarked; that something you searched for didn't yet have a bookmark; nothing you searched for has a bookmark.

Steps to Reproduce the Issue

  1. Open a file or start a new one.
  2. Bookmark one of the lines EG line 3.
  3. Identify a snippet of text in the line you just bookmarked EG "foo".
  4. Search for "foo" in this document.
  5. Notice that in the search results that line 3 does not show that it is bookmarked.

Expected Behavior

Currently expected behavior is to not show bookmarks in the search results pane.

Desired Behavior

Show the current bookmark bullet/icon somewhere on the left in the search results pane.

@sasumner
Copy link
Contributor

I could see this on a "static" basis.

Meaning that the "Find result" window's bookmark indication, once appearing in the results, would not be removable there by the user, nor would it disappear if the bookmark in the original document is removed.

Basically, the code would place it at the time the search was run, and then the code forgets about it entirely.

Is that reasonable behavior for such a feature?

@cslemmen
Copy link
Author

I think that's definitely reasonable behavior. I feel it is in keeping with the present idea of a stale search IE if something in a file/files has changed since a search was done, in this case a bookmark(s) is added or removed, then you can no longer trust your search results and should probably run the search again. Thanks.

@sasumner
Copy link
Contributor

If implemented, this would be a prime candidate to have an entry on the new find-subpage in the Prefs #8131 , something like Find-result: Show bookmarked lines from original document

@sasumner
Copy link
Contributor

sasumner commented May 1, 2020

COMMENTS WELCOME ON: In a mockup I did, I made the bookmark symbols in the search results area smaller than the editor window ones. I thought the full-sized symbols were a bit "heavy" for the results area:

image

@cslemmen
Copy link
Author

cslemmen commented May 4, 2020

Looks good. I like that the bullets are smaller in the search results pane so that it is clear that they are specific to that results set; it also doesn't hurt that they happen to be not vertically aligned in your mock either.

@sasumner
Copy link
Contributor

sasumner commented May 4, 2020

@cslemmen @xylographe and anyone else that cares to comment:

Earlier I said:

this would be a prime candidate to have an entry on the new find-subpage in the Prefs

What's the feeling on this?
Do we absolutely need a Preference setting for this to turn it on/off?
Or could it be something that is just always on?
Would it bother people to the point of complaining if it was always on?

@Ekopalypse
Copy link
Contributor

If I understand this correctly, then the bookmarks in the "Search result window" should reflect the bookmarks in the document at the time of the search, right?

If so, then I would appreciate if this could be turned off.

@xylographe
Copy link
Contributor

I believe, a Find section in Preferences is a good idea. It might make it easier to extend the Find/Replace functionality, as long as it is configurable, and the ‘factory settings’ implement current behaviour.

I feel, this bookmark extension is a good candidate, because some users are bound to complain about the marks being static after completed search, rather than dynamically following document modifications. As previously mentioned in #8099 (comment) and #8099 (comment).

[begin off-topic]
Other candidates for a Find section in Preferences :
— List of file search exclusion patterns, e.g. *.exe *.dll *.lib *.png *.tiff *.ico
— Swap "Find All in All Opened Documents" and "Find All in Current Document" (#8213)
— Replace useless (IMO) "Find All in All Opened Documents" with "Find All in Current Project"
[end off-topic]

@sasumner
Copy link
Contributor

sasumner commented May 5, 2020

@xylographe said:

I believe, a Find section in Preferences is a good idea
Other candidates for a Find section in Preferences...

Have you seen this currently open issue? #8131
Feel free to comment there as well (as totally "on topic")
Maybe your "Find All in Current Project" suggestion would drive opening a new issue (but there may already be one for that).

I feel, this bookmark extension is a good candidate (for a pref setting), because some users are bound to complain about the marks being static after completed search

The only reason I thought it might be acceptable to always have the "secondary" bookmarks always there and static is that the results lines are static as well (if you go back to the main doc and insert lines above the hits, the line numbers in the "Find result" window do not dynamically increase). BUT..."secondary" bookmarks could easily be an on/off setting, no worries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants