It is a so strange bug that I ask myself if I’m not silly.
Dim TampText, TampTab(-1) as String
Dim PressPap as New Clipboard
If Keyboard.AsyncAltKey and PressPap.TextAvailable Then
TampText = PressPap.Text
Else
TampText = "Line 1" + EndOfLine.Windows + "Line 2" + EndOfLine.Windows + "Line 3"
MessageBox "copy the 3 lines below on the clipboard :" + EndOfLine + TampText
End If
TampText = TampText.ReplaceLineEndings(EndOfLine.macOS)
TampTab = TampText.Split(EndOfLine.macOS)
MessageBox "Count of items = " + str(TampTab.Count) + EndOfLine + String.FromArray(TampTab, "<-->")
Paste that in a button and launch the app
Click button without pressing Alt key
Copy the 3 lines (1 , 2 and 3)
A messagebox appears counting 3 items which is true
Click again the button holding down the Alt key
A messagebox appears counting 5 items -> each lineendings are double
I’m doing this test on Mac Mojave. I know EndOfLine.Windows = 0D + 0A but it shouldn’t do that result or am i silly ?
I followed your instructions, ran the project, and I see no bug here. Apparently you selected all the lines when you copied the text to the clipboard, or you copied some other text to the clipboard unintentionally in between. If you are running any other app in the background simultaneously which uses the clipboard that could also be interfering with your test. Anyway, there is no bug here.