Issue 1:
Environment

Windows build number: [run "ver" at a command prompt]
**Microsoft Windows [Version 10.0.18362.207]**
OS language is dutch
Windows Terminal version (if applicable):
**Windows Terminal (Preview)
Version: 0.2.1831.0**

Any other software?

Steps to reproduce

full screen the terminal window and use the keys "windows + shift + arrow" to move the window to your second screen

Expected behavior

Go full screen on second monitor

Actual behavior

When I move it from a 1920x1080 screen to a 2560x1080 screen it goes full screen. When moving it from a 2560x1080 screen to a 1920x1080 screen the terminal crashes.

Message event viewer (Dutch)

Naam van toepassing met fout: WindowsTerminal.exe, versie: 1.0.1907.2001, tijdstempel: 0x5d1bd2d0

Naam van module met fout: ucrtbase.dll, versie: 10.0.18362.1, tijdstempel: 0x5cbddb81

Uitzonderingscode: 0xc0000409

Foutmarge: 0x000000000006d3be

Id van proces met fout: 0x3028

Starttijd van toepassing met fout: 0x01d534b9425f56b0

Pad naar toepassing met fout: C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_0.2.1831.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe

Pad naar module met fout: C:\WINDOWS\System32\ucrtbase.dll

Rapport-id: d822f0b0-3805-4c9f-b74e-87c80dc48334

Volledige pakketnaam met fout: Microsoft.WindowsTerminal_0.2.1831.0_x64__8wekyb3d8bbwe

Relatieve toepassings-id van pakket met fout: App

Issue 2:
Environment

Windows build number: Microsoft Windows [Version 10.0.18362.295]
Windows Terminal version (if applicable): latest master

This is a little tricky to describe--please bear with me.

I've given the example repro using pwsh, but I have also checked with plain C++ code, compiled and then run from cmd, and it's still a problem (so pwsh/PSReadLine are not interfering).

Steps to reproduce

Create a string "s" with SGR sequences that sets foreground to red, and background color to white, and then at the end of the string an SGR reset (which should set fg and bg back to their defaults: gray on black).

Write the string to the console, and observe that it works as expected. After the content, the rest of the line (to the window edge) is black.

Now make the string longer by just adding content in the middle... long enough that it will wrap.

Write the string to the console, and observe that it works differently. After the end of the content, the rest of the line (to the window edge) is white.

Expected behavior:

The behavior should be the same, whether or not the line wraps. And I think the current behavior in the non-wrapping case seems correct.

Actual behavior:

If the line wraps, the altered background color inexplicably shows up after the end of the content, to the end of the line.

Example repro:

$csi = "`e["
$fgRed = "${csi}91m"
$bgWhite = "${csi}107m"
$reset = "${csi}0m"

$s = "default ${fgRed}fg red ${bgWhite}bg white, no wrapping${reset} (courtesy reset)"

$s

$s2 = "default ${fgRed}fg red ${bgWhite}bg white, this content should be long enough to cause the line to be wrapped blah blah blah blah blah blah blah blah blah blah blah${reset} (courtesy reset)"

$s2

Picture:

And actually, it gets weirder: if I tweak the string's length such that the wrap occurs in the middle of the "courtesy reset" portion of the content... the bug does not repro.