New property session.readonly

26 views
Skip to first unread message

Roberto Rossi

unread,
Jan 25, 2026, 4:59:29 AM (8 days ago) Jan 25
to scite-interest
HI.

I added the "session.readonly"(1 or 0) property which saves the state of files opened in sessions.

When a session is saved or restored, the "readonly" state of open files is also saved and restored.

I hope it can be useful to you.

session_readonly_558.zip

scintillaDotOrg

unread,
Jan 30, 2026, 12:37:05 AM (3 days ago) Jan 30
to scite-interest
Roberto Rossi wrote:
I added the "session.readonly"(1 or 0) property which saves the state of files opened in sessions.

OK, committed with simplification and variable name changes.

In this code

const std::string bmString = buff.isReadOnly ? "1" : "0";
if (bmString.length()) {
propKey = IndexPropKey("buffer", i, "readonly");
fprintf(sessionFile, "%s=%s\n", propKey.c_str(), bmString.c_str());
}

bmString is always a single character string ("1" or "0") so there is no need to test its length. Any failure will throw an exception and no current C++ standard library implementation will throw due to the small string optimization.

Neil
Reply all
Reply to author
Forward
0 new messages