File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " cmjs-shell" ,
3
- "version" : " 0.3.0 " ,
3
+ "version" : " 0.3.1 " ,
4
4
"license" : " MIT" ,
5
5
"description" : " Command shell based on CodeMirror." ,
6
6
"keywords" : [" shell" , " console" ],
Original file line number Diff line number Diff line change @@ -906,7 +906,18 @@ var Shell = function( CodeMirror_, opts ){
906
906
instance . hide_function_tip ( true ) ;
907
907
}
908
908
} ) ;
909
-
909
+
910
+ // notification listener for CM scroll event,
911
+ // which may be more useful that normal scroll event
912
+ if ( opts . scroll ) {
913
+ cm . on ( "scroll" , opts . scroll ) ;
914
+ }
915
+
916
+ // notification listener for CM viewport change event
917
+ if ( opts . viewport_change ) {
918
+ cm . on ( "viewportChange" , opts . viewport_change ) ;
919
+ } ;
920
+
910
921
cm . on ( "beforeChange" , function ( cm , e ) {
911
922
912
923
// todo: split paste into separate lines,
You can’t perform that action at this time.
0 commit comments