use visible channel name in layout save #1197
Merged
+3
−3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
there's something of a long standing problem with /layout save and !-channels (eg. on IRCnet). Consider the following initial config file, without channels or windows saved:
When irssi is started on this config file, and a !-channel is joined (
/join !!new-channel
, or/join !existing-channel
), a new window is created and the channel item is added to that window, as expected./window
will report:Now, however, if
/layout save
is used by the user who wants this channel to stay in the same window next time they run irssi, a discrepancy is created:When irssi is restarted, window #3 is again created with the bound:
but when !existing-channel is rejoined, it does not match the bound on window 3, creating a new window instead and leaving window 3 empty.
So, I propose this patch to modify layout saving to create a binding for the visible_name of the channel instead, which makes this scenario of saving layouts for !-channels work correctly.