mark-my-search icon indicating copy to clipboard operation
mark-my-search copied to clipboard

[Feature Request] Add new search candidate to current highlight one?

Open tmpm697 opened this issue 1 year ago • 4 comments

Steps:

1. go to a website
2. select a word and right click, then select "Highlight Selection" to highlight it
3. select another word to highlight same as 2.
4. observe the current highlight from 2. will be removed and mark-my-search will reset its current hightlight (remove all current highlight if has) then mark-my-search displays only highlight from 3.

expect here is that both highlight from 2. and 3. still exist in mark-my-search bar and highlighted.

tmpm697 avatar Jun 04 '23 06:06 tmpm697

I agree, the current system is inconvenient. Currently we have two ways of taking keywords from the user selection:

  • Configured activation shortcut (e.g. Alt+M) replaces keywords with selected keywords, if there is a selection.
  • Context menu item (Highlight Selection) replaces keywords with selected keywords, if there is a selection.

As you can see, they do the same thing. Perhaps it would make more sense for Highlight Selection to behave differently, as you suggest, and for Alt+M to be the way of replacing keywords entirely.

If the user does not know about Alt+M however, this would make it difficult to replace keywords. Maybe the search-keywords-replace button could be made to show up on other pages too, except offering to delete all keywords?

image

When instead of deleting it would be replacing with search keywords (like here), the button could indicate this with a ...

ator-dev avatar Jun 04 '23 11:06 ator-dev

We can have two options in right mouse context menu:

1. Highlight Selection
2. Reset & Highlight Selection
  1. Will just append/add/plus the candidate to current marks array.
  2. Reset the marks array then add the candidate.

tmpm697 avatar Jun 05 '23 06:06 tmpm697

I know what you mean, but I'm not keen on adding an extra item to the context menu. Unfortunately, if you have more than one item they get pushed into a sub-menu, so every time you wanted to use one you'd have to:

right click > Mark My Search > Highlight Selection

This would also prevent being able to press H after right-clicking as a shortcut.

Maybe we could have two settings? One option to enable Highlight Selection, another to enable Highlight Only Selection.

ator-dev avatar Jun 05 '23 08:06 ator-dev

Maybe we could have two settings? One option to enable Highlight Selection, another to enable Highlight Only Selection.

yes, that's sound good, same convenience, require user to press keys to enable the function could kill the purpose, and user's preference can be different.

tmpm697 avatar Jun 05 '23 11:06 tmpm697