Repository navigation
Unsync source column count - #8143
Conversation
|
@jmcphers & @gtritchie What do you think of this approach? With this, the last RStudio instance that writes to the file will have their column state restored. This could lead to weirdness if a change is made to the layout in one session that is then closed while the user continues to work in another session, but I'm not sure if that is something we need to worry about. |
|
There are a few other instances of this kind of awkward "last one wins" behavior when you have multiple RStudio sessions. It is more pronounced here because source panes sit in an uncomfortable zone between a global user pref and session-specific UI. But in general the "last session wins" behavior is just fine as there isn't anything more reasonable to do that would make sense for this release. The only thing I'd be concerned about here is that different parts of the IDE may now have different ideas about how many additional columns there are. This change keeps the columns from actually appearing, but any code that will inspect the pref is going to pick up a number that might differ from reality, even after this change. Is that okay? Is access to that value generally encapsulated in this class? |
|
@jmcphers that's correct. In other scenarios where we care about the number of columns we get the size from |
Intent
Closes #8107
Adding or removing a column should not affect other instances of RStudio the user is running. Previously any changes made to the
additional_column_countinglobal-prefs.jsonwere made immediately, but now changes are only made on startup and when the IDE is writing to the preference file. This allows the column state to be saved between sessions, while preventing columns being added/removed in an active session without user prompt.Approach
I removed the
panesuser preference handler that was syncing the two instances. Now the column count is only updated when requested by the user in that session.QA Notes
If the user ends a session with three columns, their next session should start with three columns. However, when running two instances of RStudio, the column counts should not be in sync.
Original ticket has good repo notes.