File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " cmjs-shell" ,
3
- "version" : " 0.2.21 " ,
3
+ "version" : " 0.2.22 " ,
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 @@ -672,15 +672,19 @@ var Shell = function( CodeMirror_, opts ){
672
672
} ;
673
673
674
674
/**
675
- * hide function tip
675
+ * hide function tip.
676
+ *
677
+ * @return true if we consumed the event, or false
676
678
*/
677
679
this . hide_function_tip = function ( user ) {
678
- if ( ! this . function_tip ) return ;
680
+ if ( ! this . function_tip ) return false ;
679
681
if ( ! user ) this . function_tip . cached_tip = null ;
680
682
if ( this . function_tip . visible ) {
681
683
this . function_tip . container_node . classList . remove ( "visible" ) ;
682
684
this . function_tip . visible = false ;
685
+ return true ;
683
686
}
687
+ return false ;
684
688
} ;
685
689
686
690
/**
@@ -874,8 +878,11 @@ var Shell = function( CodeMirror_, opts ){
874
878
Down : function ( cm ) { shell_history ( false ) ; } ,
875
879
876
880
Esc : function ( cm ) {
877
- instance . hide_function_tip ( true ) ;
878
- opts . function_key_callback ( 'esc' ) ;
881
+
882
+ // don't pass through if we consume it
883
+
884
+ if ( ! instance . hide_function_tip ( true ) )
885
+ opts . function_key_callback ( 'esc' ) ;
879
886
} ,
880
887
881
888
F3 : function ( cm ) {
You can’t perform that action at this time.
0 commit comments