[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#46904: Non-unique windows produced by window-state-put
From: |
Juri Linkov |
Subject: |
bug#46904: Non-unique windows produced by window-state-put |
Date: |
Thu, 04 Mar 2021 11:39:09 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) |
>>
>> Every time the selected window remains the same:
>>
>> #<window 3 on *scratch*>
>>
>> But after splitting the window with e.g. 'C-x 2',
>> evaluating the same every time creates a new window
>> that it's expected to do even when there is only one window
>> on the frame.
>
> You mean we should do that
>
> ;; Create a new window to replace the existing one.
> (setq window (prog1 (split-window window)
> (delete-window window)))))
>
> in the one window case too? This would be certainly more consistent but
This looks like the right fix.
> I do not remember any more why this is needed in the multiple windows
> case.
And I do not remember it too, maybe the current logic handled some use cases,
maybe not.
>> I don't know how severe are the consequences. The only side-effect I noticed
>> that prev-buffers of restored windows are the same on different tabs because
>> they share the same window.
>
> If that is a problem and the above would help, let's do it. It couldn't
> possibly harm unless the root window is too small to get split and we
> want to put only one window there; so we should handle that special case.
I'll try this, thanks.
- bug#46904: Non-unique windows produced by window-state-put, Juri Linkov, 2021/03/03
- bug#46904: Non-unique windows produced by window-state-put, martin rudalics, 2021/03/04
- bug#46904: Non-unique windows produced by window-state-put,
Juri Linkov <=
- bug#46904: Non-unique windows produced by window-state-put, martin rudalics, 2021/03/04
- bug#46904: Non-unique windows produced by window-state-put, Juri Linkov, 2021/03/04
- bug#46904: Non-unique windows produced by window-state-put, Juri Linkov, 2021/03/04
- bug#46904: Non-unique windows produced by window-state-put, martin rudalics, 2021/03/05
- bug#46904: Non-unique windows produced by window-state-put, Juri Linkov, 2021/03/07
- bug#46904: Non-unique windows produced by window-state-put, martin rudalics, 2021/03/08
- bug#46904: Non-unique windows produced by window-state-put, Juri Linkov, 2021/03/08
- bug#46904: Non-unique windows produced by window-state-put, martin rudalics, 2021/03/08
- bug#46904: Non-unique windows produced by window-state-put, Juri Linkov, 2021/03/08
- bug#46904: Non-unique windows produced by window-state-put, Juri Linkov, 2021/03/09