Skip to content

Commit 5d20639

Browse files
committed
prevent pasting \r in text input
1 parent 55c45cf commit 5d20639

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

h2d/TextInput.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ class TextInput extends Text {
288288
if( !canEdit ) return;
289289
var t = hxd.System.getClipboardText();
290290
if( t != null && t.length > 0 )
291-
inputText(t);
291+
inputText(t.split("\r\n").join("\n").split("\r").join("\n"));
292292
case K.TAB if( insertTabs != null && canEdit ):
293293
inputText(insertTabs);
294294
default:

0 commit comments

Comments
 (0)