Bug 447259 - Opening a new window opens the same document that's already open
Summary: Opening a new window opens the same document that's already open
Status: RESOLVED INTENTIONAL
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: 21.08.3
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-20 09:20 UTC by strangequark
Modified: 2022-01-14 07:30 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description strangequark 2021-12-20 09:20:44 UTC
SUMMARY
When opening a new window, the document that is currently open opens in the new window. I don't know whether this behavior is intended or not, but it appears to be very weird default behavior. Ideally, opening a new window should open a new window with a blank text file, not the text file open in the window you just opened the window from.

STEPS TO REPRODUCE
1. Have a file with some text on it open.
2. Click on View > New Window

OBSERVED RESULT
The same document opens in the new window, and anything written to the new window's document also gets updated in the old one's, even without hitting save. Moreover, you can close the new window you created even with unsaved changes because the document remains open in the other window.

EXPECTED RESULT
A new window should have a new document open

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 35
KDE Plasma Version: 5.23.3
KDE Frameworks Version: 5.88.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
none
Comment 1 Christoph Cullmann 2022-01-08 22:45:11 UTC
Hi, I don't think that concept makes sense for Kate.
I open a new window to e.g. view different files of my projects on multiple screens.
Opening a new window should not imply I get a new untitled file.
If that doesn't fit your expectations, sorry, but that works as designed.
Comment 2 strangequark 2022-01-14 07:30:08 UTC
(In reply to Christoph Cullmann from comment #1)
> Hi, I don't think that concept makes sense for Kate.
> I open a new window to e.g. view different files of my projects on multiple
> screens.
> Opening a new window should not imply I get a new untitled file.
> If that doesn't fit your expectations, sorry, but that works as designed.

That makes sense.
Could there be a toggle for Kate to behave like (say) a web browser, in that I don't get all the tabs of my window when I open a new one, and closing a document in one tab doesn't close it everywhere else? That would help when the user has just plain text-editing in mind and not programming.