We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3a43eae commit 0bb33a1Copy full SHA for 0bb33a1
Signal-Windows/Controls/UserInput.xaml.cs
@@ -41,8 +41,11 @@ public string InputText
41
42
public void AddLinefeed()
43
{
44
- InputTextBox.Text += "\r";
45
- InputTextBox.SelectionStart = InputTextBox.Text.Length;
+ string prefix = InputTextBox.Text.Substring(0, InputTextBox.SelectionStart);
+ string suffix = InputTextBox.Text.Substring(InputTextBox.SelectionStart);
46
+ var pos = InputTextBox.SelectionStart;
47
+ InputTextBox.Text = prefix + "\r" + suffix;
48
+ InputTextBox.SelectionStart = pos + 1;
49
InputTextBox.SelectionLength = 0;
50
}
51
0 commit comments