Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit afb15d8

Browse files
authored
Merge branch 'master' into fixes/1294-style-treeviewitem
2 parents 65b9526 + 6e092aa commit afb15d8

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

src/GitHub.VisualStudio/Helpers/ActiveDocumentSnapshot.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
using Microsoft.VisualStudio.TextManager.Interop;
44
using System;
55
using System.ComponentModel.Composition;
6-
using System.Diagnostics;
76
using GitHub.Logging;
87

98
namespace GitHub.VisualStudio
@@ -32,6 +31,17 @@ public ActiveDocumentSnapshot([Import(typeof(SVsServiceProvider))] IServiceProvi
3231
if (ErrorHandler.Succeeded(textManager.GetActiveView(0, null, out view)) &&
3332
ErrorHandler.Succeeded(view.GetSelection(out anchorLine, out anchorCol, out endLine, out endCol)))
3433
{
34+
// Ignore the bottom anchor or end line if it has zero width (starts on column 0)
35+
// This prevents non-visible parts of the selection from being inclused in the range
36+
if (anchorLine < endLine && endCol == 0)
37+
{
38+
endLine--;
39+
}
40+
else if (anchorLine > endLine && anchorCol == 0)
41+
{
42+
anchorLine--;
43+
}
44+
3545
StartLine = anchorLine + 1;
3646
EndLine = endLine + 1;
3747
}

src/GitHub.VisualStudio/Views/TeamExplorer/RepositoryPublishView.xaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,16 +115,16 @@
115115

116116
<Grid>
117117
<ghfvs:PromptTextBox x:Name="description"
118-
Height="52"
118+
Height="23"
119119
Margin="0,8,0,0"
120-
AcceptsReturn="True"
121120
Background="{DynamicResource GitHubVsSearchBoxBackground}"
122121
Foreground="{DynamicResource GitHubVsWindowText}"
123122
Text="{Binding Description}"
124123
TextWrapping="WrapWithOverflow"
125124
PromptText="{x:Static prop:Resources.DescriptionOptional}"
126125
SpellCheck.IsEnabled="True"
127-
AutomationProperties.AutomationId="{x:Static ghfvs:AutomationIDs.TeamExplorerPublishRepositoryDescriptionTextBox}" />
126+
AutomationProperties.AutomationId="{x:Static ghfvs:AutomationIDs.TeamExplorerPublishRepositoryDescriptionTextBox}"
127+
VerticalContentAlignment="Center" />
128128
</Grid>
129129

130130
<CheckBox x:Name="makePrivate"

0 commit comments

Comments
 (0)