Bug 492877

Summary: When creating a new tab after not the last tab, Konsole often mis-remembers the current directory
Product: [Applications] konsole Reporter: Oded Arbel <oded>
Component: tabbarAssignee: Konsole Developer <konsole-devel>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version First Reported In: master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Oded Arbel 2024-09-09 12:05:37 UTC
SUMMARY
When creating a new tab, Konsole sets the current working directory in the new tab to be the same as the tab that was active when the new tab was created. This is great - except when it doesn't work, and in the current Neon unstable build of Konsole this is sometimes wrong.

STEPS TO REPRODUCE
1. Start Konsole, and navigate to directory A.
2. Create a new tab - it should start in directory A. Navigate to directory B.
3. Create a new tab - it should start in directory B. Close it.
4. Switch to the tab showing directory A.
5. Create a new tab.

OBSERVED RESULT
The latest tab's working directory is B.

EXPECTED RESULT
The latest tab's working directory should be A.

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 6.1.80
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.2
Kernel Version: 6.8.0-41-generic (64-bit)
Graphics Platform: Wayland
Processors: 20 × 12th Gen Intel® Core™ i7-12700H
Memory: 31.0 GiB of RAM
Graphics Processor: Mesa Intel® Graphics

ADDITIONAL INFORMATION
It looks like Konsole misremembers what was the last active tab. A similar problem can be observed when closing a tab - you'd expect Konsole to then activate the tab to the left of the current tab, but sometimes it activates some other tab which looks like a kind of LRU.