@@ -489,6 +489,7 @@ if CLIENT then
489489 textPanel :SetKeyboardInputEnabled ( true )
490490 textPanel :SetSize ( 0 , 0 )
491491 textPanel :SetMultiline ( true )
492+ textPanel .m_bAllowEnter = false
492493 textPanel .m_bDisableTabbing = true
493494
494495 local html = vgui .Create ( " DHTML" , editor )
@@ -559,6 +560,8 @@ if CLIENT then
559560 mod = mods .control
560561 if key == KEY_C then
561562 html :Call ( [[ console.log( "RUNLUA:SetClipboardText( '" + addslashes(editor.getSelectedText()) + "' )" ) ]] )
563+ elseif key == KEY_X then
564+ html :Call ( [[ console.log( "RUNLUA:SetClipboardText( '" + addslashes(editor.getSelectedText()) + "' )" ); editor.insert("") ]] )
562565 elseif key == KEY_SPACE then
563566 SF .Editor .doValidation ( true )
564567 elseif key == KEY_S then
@@ -584,8 +587,8 @@ if CLIENT then
584587 function textPanel :OnTextChanged ()
585588 if not ( ( input .IsKeyDown ( KEY_LCONTROL ) or input .IsKeyDown ( KEY_RCONTROL ) ) and input .IsKeyDown ( KEY_SPACE ) ) and
586589 not ( input .IsKeyDown ( KEY_LALT ) and not ( input .IsKeyDown ( KEY_LCONTROL ) or input .IsKeyDown ( KEY_RCONTROL ) ) ) and
587- self :GetText (): len () > 0 then
588- html :Call ( " editor.keyBinding.onTextInput( '" .. self :GetText ():JavascriptSafe () .. " ' )" )
590+ self :GetText () ~= " " and self : GetText () ~= " " and self : GetText () ~= " \n " then
591+ html :Call ( " editor.keyBinding.onTextInput( '" .. self :GetValue ():JavascriptSafe () .. " ' )" )
589592 end
590593 self :SetText ( " " )
591594 end
0 commit comments