Skip to content

Commit 11e46a9

Browse files
committed
Fixed the bug in Position.CompareTo.
1 parent 7149642 commit 11e46a9

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

LanguageServer.VsCode/Contracts/Location.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ public override int GetHashCode()
147147
/// <inheritdoc />
148148
public int CompareTo(Position other)
149149
{
150-
var characterComparison = Character.CompareTo(other.Character);
151-
if (characterComparison != 0) return characterComparison;
152-
return Line.CompareTo(other.Line);
150+
var lineCmp = Line.CompareTo(other.Line);
151+
if (lineCmp != 0) return lineCmp;
152+
return Character.CompareTo(other.Character);
153153
}
154154

155155
public static bool operator == (Position x, Position y)

LanguageServer.VsCode/LanguageServer.VsCode.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
<RepositoryUrl>https://github.com/CXuesong/LanguageServer.NET</RepositoryUrl>
1616
<RepositoryType>git</RepositoryType>
1717
<PackageReleaseNotes>See https://github.com/CXuesong/LanguageServer.NET/releases .</PackageReleaseNotes>
18-
<AssemblyVersion>0.1.1.2</AssemblyVersion>
19-
<FileVersion>0.1.1.2</FileVersion>
18+
<AssemblyVersion>0.1.1.3</AssemblyVersion>
19+
<FileVersion>0.1.1.3</FileVersion>
2020
</PropertyGroup>
2121

2222
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">

0 commit comments

Comments
 (0)