@@ -62,36 +62,6 @@ const Editor = Module("editor", {
62
62
return text . substring ( e . selectionStart , e . selectionEnd ) ;
63
63
} ,
64
64
65
- pasteClipboard : function ( ) {
66
- if ( liberator . has ( "Windows" ) ) {
67
- this . executeCommand ( "cmd_paste" ) ;
68
- return ;
69
- }
70
-
71
- // FIXME: #93 (<s-insert> in the bottom of a long textarea bounces up)
72
- let elem = liberator . focus ;
73
-
74
- if ( elem . setSelectionRange && util . readFromClipboard ( ) ) {
75
- // readFromClipboard would return 'undefined' if not checked
76
- // dunno about .setSelectionRange
77
- // This is a hacky fix - but it works.
78
- let curTop = elem . scrollTop ;
79
- let curLeft = elem . scrollLeft ;
80
-
81
- let rangeStart = elem . selectionStart ; // caret position
82
- let rangeEnd = elem . selectionEnd ;
83
- let tempStr1 = elem . value . substring ( 0 , rangeStart ) ;
84
- let tempStr2 = util . readFromClipboard ( ) ;
85
- let tempStr3 = elem . value . substring ( rangeEnd ) ;
86
- elem . value = tempStr1 + tempStr2 + tempStr3 ;
87
- elem . selectionStart = rangeStart + tempStr2 . length ;
88
- elem . selectionEnd = elem . selectionStart ;
89
-
90
- elem . scrollTop = curTop ;
91
- elem . scrollLeft = curLeft ;
92
- }
93
- } ,
94
-
95
65
// count is optional, defaults to 1
96
66
executeCommand : function ( cmd , count ) {
97
67
let controller = Editor . getController ( cmd ) ;
@@ -669,10 +639,6 @@ const Editor = Module("editor", {
669
639
["<C-End>"], "Move cursor to end of text field",
670
640
function () { editor.executeCommand("cmd_moveBottom", 1); });*/
671
641
672
- mappings . add ( myModes ,
673
- [ "<S-Insert>" ] , "Insert clipboard/selection" ,
674
- function ( ) { editor . pasteClipboard ( ) ; } ) ;
675
-
676
642
mappings . add ( modes . getCharModes ( "i" ) ,
677
643
[ "<C-i>" ] , "Edit text field with an external editor" ,
678
644
function ( ) { editor . editFieldExternally ( ) ; } ) ;
0 commit comments