756fd444b1
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request Opt in setting to trim trailing white space when pasting a text into the terminal <!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> ## References <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [x] Closes #9400 * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [ ] Tests added/passed * [ ] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx * [ ] Schema updated. * [ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx <!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed Manually testing to paste text with and without trailing white spaces, with and without the option activated
85 lines
4.1 KiB
XML
85 lines
4.1 KiB
XML
<!--
|
|
Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
|
|
the MIT License. See LICENSE in the project root for license information.
|
|
-->
|
|
<Page x:Class="Microsoft.Terminal.Settings.Editor.Interaction"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:local="using:Microsoft.Terminal.Settings.Editor"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
|
|
mc:Ignorable="d">
|
|
|
|
<Page.Resources>
|
|
<ResourceDictionary>
|
|
<ResourceDictionary.MergedDictionaries>
|
|
<ResourceDictionary Source="CommonResources.xaml" />
|
|
</ResourceDictionary.MergedDictionaries>
|
|
|
|
<DataTemplate x:Key="EnumRadioButtonTemplate"
|
|
x:DataType="local:EnumEntry">
|
|
<RadioButton Content="{x:Bind EnumName, Mode=OneWay}" />
|
|
</DataTemplate>
|
|
</ResourceDictionary>
|
|
</Page.Resources>
|
|
|
|
<ScrollViewer ViewChanging="ViewChanging">
|
|
<StackPanel Style="{StaticResource SettingsStackStyle}">
|
|
<!-- Copy On Select -->
|
|
<local:SettingContainer x:Uid="Globals_CopyOnSelect"
|
|
Margin="0">
|
|
<ToggleSwitch IsOn="{x:Bind State.Globals.CopyOnSelect, Mode=TwoWay}" />
|
|
</local:SettingContainer>
|
|
|
|
<!-- Copy Format -->
|
|
<local:SettingContainer x:Uid="Globals_CopyFormat">
|
|
<muxc:RadioButtons AutomationProperties.AccessibilityView="Content"
|
|
ItemTemplate="{StaticResource EnumRadioButtonTemplate}"
|
|
ItemsSource="{x:Bind CopyFormatList, Mode=OneWay}"
|
|
SelectedItem="{x:Bind CurrentCopyFormat, Mode=TwoWay}" />
|
|
</local:SettingContainer>
|
|
|
|
<!-- Trim Block Selection -->
|
|
<local:SettingContainer x:Uid="Globals_TrimBlockSelection">
|
|
<ToggleSwitch IsOn="{x:Bind State.Globals.TrimBlockSelection, Mode=TwoWay}" />
|
|
</local:SettingContainer>
|
|
|
|
<!-- Trim Paste -->
|
|
<local:SettingContainer x:Uid="Globals_TrimPaste">
|
|
<ToggleSwitch IsOn="{x:Bind State.Globals.TrimPaste, Mode=TwoWay}" />
|
|
</local:SettingContainer>
|
|
|
|
<!-- Word Delimiters -->
|
|
<local:SettingContainer x:Uid="Globals_WordDelimiters">
|
|
<TextBox IsSpellCheckEnabled="False"
|
|
Style="{StaticResource TextBoxSettingStyle}"
|
|
Text="{x:Bind State.Globals.WordDelimiters, Mode=TwoWay}" />
|
|
</local:SettingContainer>
|
|
|
|
<!-- Snap On Resize -->
|
|
<local:SettingContainer x:Uid="Globals_SnapToGridOnResize">
|
|
<ToggleSwitch IsOn="{x:Bind State.Globals.SnapToGridOnResize, Mode=TwoWay}" />
|
|
</local:SettingContainer>
|
|
|
|
<!-- Tab Switcher Mode -->
|
|
<local:SettingContainer x:Uid="Globals_TabSwitcherMode">
|
|
<muxc:RadioButtons AutomationProperties.AccessibilityView="Content"
|
|
ItemTemplate="{StaticResource EnumRadioButtonTemplate}"
|
|
ItemsSource="{x:Bind TabSwitcherModeList}"
|
|
SelectedItem="{x:Bind CurrentTabSwitcherMode, Mode=TwoWay}" />
|
|
</local:SettingContainer>
|
|
|
|
<!-- Focus Follow Mouse Mode -->
|
|
<local:SettingContainer x:Uid="Globals_FocusFollowMouse">
|
|
<ToggleSwitch IsOn="{x:Bind State.Globals.FocusFollowMouse, Mode=TwoWay}" />
|
|
</local:SettingContainer>
|
|
|
|
<!-- Detect URLs -->
|
|
<local:SettingContainer x:Uid="Globals_DetectURLs">
|
|
<ToggleSwitch IsOn="{x:Bind State.Globals.DetectURLs, Mode=TwoWay}" />
|
|
</local:SettingContainer>
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
</Page>
|