Skip to content

restore current working directory in terminal even if directory selected - #2859

Open
danthe1st wants to merge 1 commit into
eclipse-platform:masterfrom
danthe1st:terminal-restore-directories
Open

restore current working directory in terminal even if directory selected#2859
danthe1st wants to merge 1 commit into
eclipse-platform:masterfrom
danthe1st:terminal-restore-directories

Conversation

@danthe1st

@danthe1st danthe1st commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

When creating a new terminal with a folder selected (by pressing Ctrl+Alt+T) with terminals to be restored (i.e. #2850 is enabled and there are terminals from a previous session), Eclipse currently resets the working directory of the folders to be restored to the selection (and the new terminal is also using that selection).

This PR changes this by only using the selection for new terminals. As the new terminal was previously added at the beginning of the CTabFolder/list of terminals (because the order of the terminals being opened was wrong), I also made sure that the newly opened terminal is at the very right where it should be.

I hope nobody relies on this broken behaviour (otherwise I could add a preference for the first fix but I don't really see why anyone would want that).

@danthe1st
danthe1st force-pushed the terminal-restore-directories branch 2 times, most recently from d8fe8ed to 2320426 Compare August 8, 2026 13:40
When the terminals in the terminal view were restored with a directory
selected, all the terminals to restore were set to use the directory of
the selection. With this change, the selection is only used for new
terminals and not for ones that are restored.
@danthe1st
danthe1st force-pushed the terminal-restore-directories branch from 2320426 to 589e01d Compare August 8, 2026 13:41
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Test Results

   36 files   -    18     36 suites   - 18   38m 46s ⏱️ - 20m 8s
4 707 tests ±    0  4 684 ✅  -     1  23 💤 + 1  0 ❌ ±0 
8 008 runs   - 4 004  7 918 ✅  - 3 941  90 💤  - 63  0 ❌ ±0 

Results for commit 589e01d. ± Comparison against base commit 1cc9ae4.

This pull request skips 1 test.
org.eclipse.core.tests.resources.regression.Bug_329836 ‑ testBug(Path)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant