Start selection from padding #7774

Closed
opened 2026-01-31 01:12:16 +00:00 by claunia · 6 comments
Owner

Originally created by @synchronos-t on GitHub (Apr 28, 2020).

Originally assigned to: @carlos-zamora on GitHub.

Description of the new feature/enhancement

This is just a minor UX issue, but I'd intuitively expect that text selection is also possible if I start dragging with mouse from the padding (i.e. the margin between the content and window border). Were it possible, it would also make selection from the beginning of a line much easier.

In most of the text editors starting to drag from the left padding also selects full lines. That is maybe not needed in a terminal, but it's perhaps still something to consider, whether it'd be beneficial and expected. Most of those work so that the selection stays in the full line mode even if you drag onto the content area, but I also started to think whether it'd make sense in a terminal to only select full lines if the drag stays on the left padding, and select normally (last line is selected up to the mouse position) if the drag moves onto the content. In any case, this full-line selection from left padding is not as expected a functionality than the possibility to start normal selection from padding (any side of the padding).

Originally created by @synchronos-t on GitHub (Apr 28, 2020). Originally assigned to: @carlos-zamora on GitHub. # Description of the new feature/enhancement This is just a minor UX issue, but I'd intuitively expect that text selection is also possible if I start dragging with mouse from the padding (i.e. the margin between the content and window border). Were it possible, it would also make selection from the beginning of a line much easier. In most of the text editors starting to drag from the left padding also selects full lines. That is maybe not needed in a terminal, but it's perhaps still something to consider, whether it'd be beneficial and expected. Most of those work so that the selection stays in the full line mode even if you drag onto the content area, but I also started to think whether it'd make sense in a terminal to only select full lines if the drag stays on the left padding, and select normally (last line is selected up to the mouse position) if the drag moves onto the content. In any case, this full-line selection from left padding is not as expected a functionality than the possibility to start normal selection from padding (any side of the padding).
Author
Owner

@zadjii-msft commented on GitHub (Apr 28, 2020):

Wait I could have swore we fixed this with #4282/#4506 - @synchronos-t what version of the Terminal are you using?

@zadjii-msft commented on GitHub (Apr 28, 2020): Wait I could have swore we fixed this with #4282/#4506 - @synchronos-t what version of the Terminal are you using?
Author
Owner

@DHowett-MSFT commented on GitHub (Apr 29, 2020):

So, this is part feature request part bug. There's the immediate bug ("I can't begin a selection if I start in the gutter"), and the request that gutter selection select the whole line like a word processor.

Just tried in 0.9 (before any selection changes), and the gutter doesn't allow selection there either. The linked changes are for unfocused terminals -- this is about padding in a focused one, presumably.

I'm going to take off NAF and triage this into "1.x"

@DHowett-MSFT commented on GitHub (Apr 29, 2020): So, this is part feature request part bug. There's the immediate bug ("I can't begin a selection if I start in the gutter"), and the request that gutter selection select the whole line like a word processor. Just tried in 0.9 (before any selection changes), and the gutter doesn't allow selection there either. The linked changes are for _unfocused_ terminals -- this is about padding in a focused one, presumably. I'm going to take off NAF and triage this into "1.x"
Author
Owner

@synchronos-t commented on GitHub (Apr 29, 2020):

Yes, sorry, should've provided the version number. Here they are, although I believe it doesn't matter that much any more. Yesterday I was using 0.11.1121.0 and now just updated to 0.11.1191.0. And yes, this was about selection in a focused terminal.

I thought about it yesterday whether to file this as a bug report or a feature request, and wasn't sure which one would be more suitable. After all, even the first part is just an usability enhancement, not something that is clearly broken. Anyway, I'd be happy with just the first part fixed; the second was more like a food for thought that came to mind while thinking about the selection from padding.

Anyway, good work with the Terminal so far!

@synchronos-t commented on GitHub (Apr 29, 2020): Yes, sorry, should've provided the version number. Here they are, although I believe it doesn't matter that much any more. Yesterday I was using 0.11.1121.0 and now just updated to 0.11.1191.0. And yes, this was about selection in a focused terminal. I thought about it yesterday whether to file this as a bug report or a feature request, and wasn't sure which one would be more suitable. After all, even the first part is just an usability enhancement, not something that is clearly broken. Anyway, I'd be happy with just the first part fixed; the second was more like a food for thought that came to mind while thinking about the selection from padding. Anyway, good work with the Terminal so far!
Author
Owner

@carlos-zamora commented on GitHub (Jun 3, 2020):

Huh. So, if you click on the space created by the padding (defined by SwapChainPanel.Margin()), you do not activate the PointerPressed handler. But this space in the UI belongs to the SwapChainPanel (because, where else would it go?). @DHowett would this be a bug to file on WinUI?

@carlos-zamora commented on GitHub (Jun 3, 2020): Huh. So, if you click on the space created by the padding (defined by `SwapChainPanel.Margin()`), you do _not_ activate the PointerPressed handler. But this space in the UI belongs to the SwapChainPanel (because, where else would it go?). @DHowett would this be a bug to file on WinUI?
Author
Owner

@DHowett commented on GitHub (Jun 3, 2020):

Margin applies outside a xaml element. Padding applies inside a xaml element. Consider: did we use the wrong one?

@DHowett commented on GitHub (Jun 3, 2020): `Margin` applies _outside_ a xaml element. `Padding` applies _inside_ a xaml element. Consider: did we use the wrong one?
Author
Owner

@ghost commented on GitHub (Jul 22, 2020):

:tada:This issue was addressed in #6343, which has now been successfully released as Windows Terminal Preview v1.2.2022.0.🎉

Handy links:

@ghost commented on GitHub (Jul 22, 2020): :tada:This issue was addressed in #6343, which has now been successfully released as `Windows Terminal Preview v1.2.2022.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.2.2022.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#7774