Add standard text search and replace#2559
Conversation
|
Thanks for working on this and the screenshot! To me at least it looks quite complicated at first, user will next ask where can I replace only this highlighted one? Where can I replace all? Thats the two most important buttons to be easy recognizable |
These two features have already been implemented in this PR, and these two buttons can popup tool tips, users can easily recognize it. |
f321b1d to
73fe25a
Compare
|
I will check it, but it works well on my phone. SVID_20260206_080628_1.mp4 |
|
A crash I could get, but thats not whats currently on the branch, I just tried with |
|
Hello, @gsantner |
d3c16f5 to
c3bd617
Compare
|
Thanks for creating this and working on it for quite some time. I merged it! |
| }); | ||
|
|
||
| listView.setOnItemLongClickListener((parent, view, pos, id) -> directActivate.callback(pos, true)); | ||
| // listView.setOnItemLongClickListener((parent, view, pos, id) -> directActivate.callback(pos, true)); |
There was a problem hiding this comment.
Why was this disabled?!
Long pressing was extremely useful and I had it set up for many actions.
For example:
- Long press snippet to directly jump to and edit the snippet
- Long press todo in the search field to directly jump to it
- Long press context / project in the filtering dialogs to see them directly
All of these are now not working
There was a problem hiding this comment.
Hi, @harshad1
I find it easy to trigger incorrect action by long pressing. For example, it may cause incorrect jumps due to unintentionally long pressing an item when you slide the TOC list, so I disabled it at that time.
I will revert it soon.
| searchEditText.setTextColor(dopt.textColor); | ||
| searchEditText.setHintTextColor(ColorUtils.setAlphaComponent(dopt.textColor, 0x99)); | ||
| searchEditText.setHint(dopt.searchHintText); | ||
| searchEditText.setText(dopt.searchText); |
There was a problem hiding this comment.
We have dopt.state.searchText
That is what should be set here. I am making the change in #2736
There was a problem hiding this comment.
The reason why I added searchEditText.setText(dopt.searchText) at that time is as follows:
Assuming you input a search text in search dialog, then you switch to replace dialog. dopt.searchText can keep search text from search dialog to replace dialog. This can avoid typing the same search text again.
Here is an example, see search text 'hello':
petal_20260408_233837.mp4
There was a problem hiding this comment.
Yes. Setting state.searchText does that :)


This PR makes Markor support standard text search and replace that are widely adopted by most text editors.
Related Issues:
#2164 - Show search as find in page, not in a popup
#2341 - Highlight in-search results
#2582 - Markor search jumps not to exact finding position
Supported features are as follows:
Standard UI for text find & replace
Highlight all matches/occurrences
Highlight current active match
Jump to previous/next match
Match case
Match whole word
Use regular expression
Find in selection
Replace once
Replace all
Preserve case when replacing
Toggle to line based text search