Fixes #2739. UICatalog Text Editor Column / Row not be updated when cursor moving. (#2741)

This commit is contained in:
BDisp
2023-07-12 16:45:40 +01:00
committed by GitHub
parent 325180ae48
commit 33b4abab4b

View File

@@ -60,12 +60,6 @@ namespace UICatalog.Scenarios {
CreateDemoFile (_fileName);
var siCursorPosition = new StatusItem (Key.Null, "", null);
_textView.UnwrappedCursorPosition += (s, e) => {
siCursorPosition.Title = $"Ln {e.Point.Y + 1}, Col {e.Point.X + 1}";
};
LoadFile ();
Win.Add (_textView);
@@ -119,6 +113,8 @@ namespace UICatalog.Scenarios {
Application.Top.Add (menu);
var siCursorPosition = new StatusItem (Key.Null, "", null);
var statusBar = new StatusBar (new StatusItem [] {
siCursorPosition,
new StatusItem(Key.F2, "~F2~ Open", () => Open()),
@@ -127,6 +123,12 @@ namespace UICatalog.Scenarios {
new StatusItem(Application.QuitKey, $"{Application.QuitKey} to Quit", () => Quit()),
new StatusItem(Key.Null, $"OS Clipboard IsSupported : {Clipboard.IsSupported}", null)
});
_textView.UnwrappedCursorPosition += (s, e) => {
siCursorPosition.Title = $"Ln {e.Point.Y + 1}, Col {e.Point.X + 1}";
statusBar.SetNeedsDisplay ();
};
Application.Top.Add (statusBar);
_scrollBar = new ScrollBarView (_textView, true);