Opt-Selecting Will Delete Across Scrivenings

I just discovered this and I don’t know if it’s a bug or not. I know that normally you can’t delete across Scrivenings and that there are good reasons for this. However, it’s possible to hold down the option key and select text that way and then delete across Scrivenings.

selected text.png

Since it’s in two different documents, “undo” won’t work, which means if someone does accidentally do this (I have no idea how hard it would be to do accidentally…do people option-select much? Probably not) then it might be A Bit Unfortunate.

Anyway, just wanted to point it out.

Ooo, nasty, no that definitely should be prohibited if it can. The main problem is titles and any protected newlines. If you try this without titles, you’ll find that you can undo, but if part of a title gets snipped or if the block selection was large enough to include protected newlines, undo will malfunction.

Unfortunately it might be hard to prohibit; I don’t know for sure. I do know Opt-dragging is an underlying text engine feature—and incidentally this problem also exists if you Cmd-select multiple areas at once and that selection includes the title (but if it includes protected newlines the delete just fails)—so it might be completely bypassing all of the safeties, passing beneath them you might say. It looks like Cmd-select at least acts a bit more ordinarily since it does system beep and refuse to delete the end of the last paragraph.

Yeah, technically this isn’t a bug because it just gives the same result - as far as Scrivener is concerned or can possibly know - as the user selecting multiple ranges of text and then deleting them. As no boundaries have been selected, this is perfectly valid. However, what I may do is make it so that if there is a multiple selection and one selection is in a title and others aren’t (if titles are shown), then prohibit any edits - that will at least avoid the situation of accidentally deleting text and being left without an undo option (because editing titles necessarily resets the undo stack, unfortunately).