File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -421,6 +421,16 @@ const CommandLine = Module("commandline", {
421
421
}
422
422
} ,
423
423
424
+ _isIMEComposing : false ,
425
+
426
+ onCompositionStart : function ( e ) {
427
+ this . _isIMEComposing = true ;
428
+ } ,
429
+
430
+ onCompositionEnd : function ( e ) {
431
+ this . _isIMEComposing = false ;
432
+ } ,
433
+
424
434
get command ( ) {
425
435
try {
426
436
// The long path is because of complications with the
@@ -1529,6 +1539,12 @@ const CommandLine = Module("commandline", {
1529
1539
literal : 0
1530
1540
} ) ;
1531
1541
} ,
1542
+ events : function ( ) {
1543
+ // The commandline should know when the user is inputting complex text, some functionalities may depend on it; i.e. finder.js
1544
+ let textbox = document . getElementById ( "liberator-commandline-command" ) ;
1545
+ events . addSessionListener ( textbox , "compositionstart" , this . closure . onCompositionStart ) ;
1546
+ events . addSessionListener ( textbox , "compositionend" , this . closure . onCompositionEnd ) ;
1547
+ } ,
1532
1548
mappings : function ( ) {
1533
1549
var myModes = [ modes . COMMAND_LINE ] ;
1534
1550
Original file line number Diff line number Diff line change @@ -100,7 +100,11 @@ var Finder = Module("finder", {
100
100
this . _backwards = mode == modes . SEARCH_BACKWARD ;
101
101
//commandline.open(this._backwards ? "Find backwards" : "Find", "", mode);
102
102
commandline . input ( this . _backwards ? "Find backwards" : "Find" , this . closure . onSubmit , {
103
- onChange : function ( ) { if ( options [ "incsearch" ] ) finder . find ( commandline . command ) }
103
+ onChange : function ( ) {
104
+ if ( options [ "incsearch" ] && ! commandline . _isIMEComposing ) {
105
+ finder . find ( commandline . command ) ;
106
+ }
107
+ }
104
108
} ) ;
105
109
//modes.extended = mode;
106
110
You can’t perform that action at this time.
0 commit comments