[PR #19799] Feature: Add setting for customizable delimiter for file drag-and-drop #31963

Open
opened 2026-01-31 09:50:38 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/19799

State: open
Merged: No


Summary of the Pull Request

This PR introduces a new profile setting, dragDropDelimiter, which allows users to configure the string separator used when dragging and dropping multiple files into the terminal. The default behavior remains a single space (" ") for backward compatibility.

References and Relevant Issues

Detailed Description of the Pull Request / Additional comments

Implementation Details:

  • Settings: Added DragDropDelimiter to MTSMSettings.h and Profile.idl.
  • Control: Wired the setting through ControlProperties.h so the terminal logic can see it.
  • Logic: Updated TermControl::OnDrop to use the new delimiter when joining paths.
  • UI: Added the text box in the Advanced Settings page and updated the ViewModel.

Demo

https://github.com/user-attachments/assets/81ffe0ee-57fc-41be-802d-4da2934cc53a

Validation Steps Performed

  • Manual Verification:
    • Verified default behavior (space separator) works as before.
    • Configured dragDropDelimiter to ", ", ";", and custom strings in settings.json and from settings UI.
    • Confirmed dropped files are joined correctly.
  • Build: Validated that the solution builds cleanly.

Notes for Reviewers

  1. Delimiter Length: Currently, there is no limit on the maximum length of the delimiter string. Let me know if this should be changed.
  2. Localization: I changed only Resources/en-US file.
  3. ViewModel: In ProfileViewModel.cpp, I added the else if block for the new setting, but left it empty because no other UI logic currently depends on it.

PR Checklist

**Original Pull Request:** https://github.com/microsoft/terminal/pull/19799 **State:** open **Merged:** No --- ## Summary of the Pull Request This PR introduces a new profile setting, `dragDropDelimiter`, which allows users to configure the string separator used when dragging and dropping multiple files into the terminal. The default behavior remains a single space (`" "`) for backward compatibility. ## References and Relevant Issues * Closes #19565 ## Detailed Description of the Pull Request / Additional comments **Implementation Details:** * **Settings:** Added `DragDropDelimiter` to `MTSMSettings.h` and `Profile.idl`. * **Control:** Wired the setting through `ControlProperties.h` so the terminal logic can see it. * **Logic:** Updated `TermControl::OnDrop` to use the new delimiter when joining paths. * **UI:** Added the text box in the Advanced Settings page and updated the ViewModel. ## Demo https://github.com/user-attachments/assets/81ffe0ee-57fc-41be-802d-4da2934cc53a ## Validation Steps Performed * **Manual Verification:** * Verified default behavior (space separator) works as before. * Configured `dragDropDelimiter` to `", "`, `";"`, and custom strings in `settings.json` and from settings UI. * Confirmed dropped files are joined correctly. * **Build:** Validated that the solution builds cleanly. ## Notes for Reviewers 1. **Delimiter Length:** Currently, there is no limit on the maximum length of the delimiter string. Let me know if this should be changed. 3. **Localization:** I changed only `Resources/en-US` file. 4. **ViewModel:** In `ProfileViewModel.cpp`, I added the `else if` block for the new setting, but left it empty because no other UI logic currently depends on it. ## PR Checklist - [x] Closes #19565 - [ ] Tests added/passed - [ ] Documentation updated - [x] Schema updated (if necessary)
claunia added the pull-request label 2026-01-31 09:50:38 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#31963