Add Alt+Z shortcut to toggle word wrap #1487
Some checks are pending
MSBuild / build (push) Waiting to run
MSBuild / publish (push) Blocked by required conditions

Introduced a keyboard shortcut (Alt+Z) to toggle the WordWrap property in the TextViewerPanel for improved usability.
This commit is contained in:
ema
2025-06-27 07:03:11 +08:00
parent a7c89d7e69
commit 4ff7cd53c4

View File

@@ -124,6 +124,13 @@ public partial class TextViewerPanel : TextEditor, IDisposable
else if (Keyboard.IsKeyDown(Key.LeftShift))
FlowDirection = System.Windows.FlowDirection.LeftToRight;
}
else if (Keyboard.IsKeyDown(Key.LeftAlt) || Keyboard.IsKeyDown(Key.RightAlt))
{
if (Keyboard.IsKeyDown(Key.Z))
{
WordWrap = !WordWrap;
}
}
}
private class TruncateLongLines : VisualLineElementGenerator