Hello, @coises and All,
I’m really sorry for the confusion. Actually, overall, I think of bookmarks in Search++ more or less the same way they’re used in N++. That is to say:
Lines with bookmarks may or may not end with a line break ( cases : Mark ^.* or Mark ^.*\R )
The marked text may be present or not :
For example, within N++, with the Bookmark line option checked, mark all lines with ^.*\R, first, then uncheck the Bookmark line option and finally use the Clear all marks button => The bookmarked lines are still present and you can act on them although no marked text exists anymore !
In all cases, once these bookmarked lines are copied / cutted to another location or into another file, you’ll find the exact same text !
Of course, the case ^.*\R should be preferred, when necessary, as it takes in account true empty lines. If the empty lines are not needed, just use the ^.+\R regex to mark the text !
Thus, in my previous post, I made a mistake. I should have written :
Personally, after an Invert bookmarks action, you may possibly use the Mark only text in bookmarked lines option, for a better coherence and readability !
You said :
The ideas at the front of my mind now are:
Make Invert marked text a single command (no Invert sub-menu) which does only and exactly that one thing: mark every unmarked character and unmark every marked character. No bookmark changes, and no special treatment for line ending characters.
Eliminate the “Bookmark first line of marked text” options. If you’re manipulating bookmarks based on marked text, trying to keep track of what is the “first line” is probably useless, confusing or both. (I still might remove that whole section of the Configure bookmarks dialog, too.)
For the Synchronize commands which Bookmark lines containing marked text, apply these rules:
Lines containing only a line ending (empty lines) are bookmarked if the line ending is marked.
Lines containing characters other than the line ending character(s) are bookmarked if any character other than the line ending character(s) is marked; the line ending is ignored.
I totally agree to these three expectations !
You said :
I’m curious if you can think of situations where that would not behave as a user would expect.
No, up to now, I cannot think about such situations, either !
You said, near the end of you post :
So, back to the situation where it’s the bookmarks that are primary, and you want update marks to follow bookmarks. I gather you do think it’s important to give the user control of whether line endings are included or not.
No, I don’t think the user control of line-endings is that important. Again, @coises, sorry for the confusion ! Actually, I think it’s better to take EOLs in account, in all cases !
So, don’t worry, anymore, about the necessity of distinguish the cases with OR without EOL characters ! Anyway, once the bookmarked lines are copied / cutted, it’s not the marked text which is copied / cutted but the bookmarked lines THEMSELVES !
Best Regards
guy038