A couple bugs.

Screenwriting mode: Pressing enter on a blank line brings up the line formatting drop box, when all I want to do is add blank lines to separate blocks of text.

Pressing enter on a line with text adds a blank line, but also highlights the text.

I’ve always figured this isn’t a bug, but simply how Scrivener eases scriptwriting. Worked around it by putting a semicolon on an otherwise blank line, then going back and deleting the semicolon after setting up the next block. But I’d like a stickier way as well.

Related question: if a user wishes to mix some sample source code into a document, a reference manual for example, is Scriptwriting mode the best way to do it?

The most obvious requirements for source code formatting are a fixed width font and to disable autocorrect and smart punctuation. But there may be something more I'm forgetting.
Rgds – Jerome

Agreed, I think it is a feature, if and only if, that is what you want to happen. A means of toggling that behavior would be a nice addition.

Scrivener just copies the Final Draft behaviour here. I’m not sure what you’re doing particularly, but perhaps just adjusting the line spacing for the following element would achieve the additional space you’re after?

There’s not necessarily a best way. If you’re looking just to make it simple to switch into and out of the formatting, setting up a script can help; take a look at the script used in the Humanities Essay as an example. If you don’t have to insert code samples that frequently, you may just rather format them as they come up or not deal with the formatting at all until after you compile. If you’re formatting in the editor, you’ll want to compile without overriding formatting, which means you’ll need to ensure that you’ve formatted all your text consistently, not just the code samples. You might then rather use something like a red text color to give the code a formatting hook, letting you use the regular override to format everything else and then use Word’s “select similar formatting” after compiling to quickly reformat just those red-text code sections. We will be adding a way to preserve formatting on specific text within a document, but even with that already in the Mac version, some users still find it simpler to use very basic formatting tags when drafting and then just swap out the styles after compiling.

Thanks, MM. Guess I can always chunk those segments into text files for greatest confidence. – JJS