Select Similar Formatting - is it selecting by date?

I’m seeing some odd things happening with the Select Similar Formatting option.

Today I tried it on a document I had just finished typing - when I selected based off a bit of text at the bottom and then scrolled up I found that the selection didn’t go past a certain point, even though the formatting was identical. Selecting text at the top and then scrolling down revealed the same thing. The point where the selection wouldn’t go past was the spot where I knocked off last night and then resumed today.

Similarly, if I export and then import and split a document and then edit some of the resulting scrivenings - Select Similar Formatting only selects documents with the same Modified date.

While restarting Scriv seems to have helped in the first instance, no amount of restarts has helped it figure out the similarities after import and split.

If needed I’ll try to reproduce with something I can actually screen shot and/or send in if needed, but it might take a few days to get something set up.

Okay, here’s some screen shots of what I’m seeing.

The Lipsum text I put in yesterday, the English I quickly typed in this morning. All of it is in script mode just alternating back and forth between two script elements.

As you can see Select Similar Formatting won’t select past the the date line in either direction.

Same result after an Export / Import & Split.

And I’m not sure what was happening yesterday, but today restarting Scriv made no difference.

Could you attach a project showing the issue?

The formatting does have to be the same, so text with styles won’t be selected along with text without styles even if they look the same (styles being part of the formatting). Modification dates don’t have anything to do with it, although saving and reloading can subtly alter certain values in the formatting (something to do with Apple’s RTF saving and loading routines) which could possibly (I’m guessing here) mean that something you created before closing and reloading Scrivener might not have exactly the same formatting as text you created in the recent session. That wouldn’t be expected behaviour - I’m just guessing at what might be the cause.

If you can send me a project demonstrating the issue, though, I can find out for sure.

All the best,

Heh, it is apparently a difficult thing to set up a demonstration of. I had a new test project which was exhibiting exactly the behaviour I described, but on a subsequent reopen of that project - it somehow sorted itself out. :unamused:

I Import & Split a document.
Used project search to find a subset of the text. Selected all the search results to load into a scrivenings session. Selected all the documents in the editor and applied a style - just the built in emphasis character style, nothing fancy.

Select Similar Formatting at that point looks like this:

Close and reopen the project, Select Similar Formatting now looks like this:

The ones that aren’t highlighted above are apparently No Style, not Emphasis (even though Select Similar Formatting clearly thought they were Emphasis before closing the project).

I had a look at the package contents in Finder and the ones that have No Style did not have the content.styles file saved, only the content.rtf. Also the <$Scr_Cs::0> <!$Scr_Cs::0> tags were missing from the content.rtf . I’ve applied styles like that after an import & split to over 3000 files now, always with varying levels of success. One common factor is it usually (always?) seems to be the very short files like shown above that have the problem. I don’t recall it happening to one that has more than 10 or so words.

I’ll attach that here in case it shows you what you need. Meanwhile I’ll keep fussing with it and see if I can turn up any more details on what’s happening. (45.3 KB)

Still happening in 3.01 (966).

Here’s another example project showing the Style info not saving.

Steps to reproduce:
In the attached project, open the folder in Scrivenings mode
Click into first text line of text.
Edit | Select | Similar Formatting --> everything is selected because it’s all the same format

Apply a style, Centred text makes this easy to see --> scroll about, everything is now centred.

Close Scriv.
Reopen project.
Look around - now only some things are centred. The non-centred items are back to No Style.

For some reason it seems to always be the short sections with just a few words where the style info is not saved. I’ve tested with a few different styles, both paragraph and character styles, and the same thing happens. (189 KB)

The other issue: Select Similar Formatting not selecting beyond a particular session boundary is easy to reproduce.

Start a new project, blank template works well.
Start a document in script mode I just tested with the default ScreenPlay Format.
Type a few lines, flip back and forth between a couple script elements.
Close and reopen Scriv.
Type a few more lines in the project,
Select Similar Formatting, and the selection doesn’t go beyond the session boundary.

Close and reopen scriv again – now if you Select Similar formatting it seems to select properly for the existing text, but if you type more new lines, then once again the selection won’t go past the boundary of the most recent session.

Edit: Well I’m not sure if I’ve actually provided any more details here, but at least I did fuss with it as promised. :laughing:

FWIW, ditto.

These issues should be fixed for 3.0.2.