Skip to content

Commit 8b778c6

Browse files
authored
Correct the default foreground/background colors (#1435)
1 parent dd0eb9a commit 8b778c6

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ PSReadline.zip
77
# Build Folders (you can keep bin if you'd like, to store dlls and pdbs)
88
[Bb]in/
99
[Oo]bj/
10+
.ionide/
1011

1112
# VSCode directories that are not at the repository root
1213
/**/.vscode/

PSReadLine/Cmdlets.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,8 +443,8 @@ internal void ResetColors()
443443
if (fg == VTColorUtils.UnknownColor || bg == VTColorUtils.UnknownColor)
444444
{
445445
// TODO: light vs. dark
446-
fg = ConsoleColor.Black;
447-
bg = ConsoleColor.Gray;
446+
fg = ConsoleColor.Gray;
447+
bg = ConsoleColor.Black;
448448
}
449449

450450
SelectionColor = VTColorUtils.AsEscapeSequence(bg, fg);

PSReadLine/History.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ internal static uint ComputeHash(string input)
3434
{
3535
ch = input[i];
3636
lowByte = (uint)(ch & 0x00FF);
37-
hash = (hash ^ lowByte) * FNV32_PRIME;
37+
hash = unchecked((hash ^ lowByte) * FNV32_PRIME);
3838

3939
highByte = (uint)(ch >> 8);
40-
hash = (hash ^ highByte) * FNV32_PRIME;
40+
hash = unchecked((hash ^ highByte) * FNV32_PRIME);
4141
}
4242

4343
return hash;

PSReadLine/PSReadLine.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<AssemblyVersion>2.0.0.0</AssemblyVersion>
88
<FileVersion>2.0.0</FileVersion>
99
<InformationalVersion>2.0.0</InformationalVersion>
10+
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
1011
<TargetFrameworks>net461;netcoreapp2.1</TargetFrameworks>
1112
</PropertyGroup>
1213

0 commit comments

Comments
 (0)