File tree Expand file tree Collapse file tree 3 files changed +21
-3
lines changed
Expand file tree Collapse file tree 3 files changed +21
-3
lines changed Original file line number Diff line number Diff line change 148148 var excludeProperties = false ;
149149 var excludeAggregates = false ;
150150 var candlists = [ ] ;
151+ var toexclude = [ ] ;
151152 switch ( state . section ) {
152153 case 'objects' :
153154 {
158159 }
159160 case 'legend' :
160161 {
162+ var splits = lineToCursor . toLowerCase ( ) . split ( / [ \p{ Z} \s ] / u) . filter ( function ( v ) {
163+ return v !== '' ;
164+ } ) ;
165+ toexclude = splits ;
161166 if ( lineToCursor . indexOf ( '=' ) >= 0 ) {
162167 if ( ( lineToCursor . trim ( ) . split ( / \s + / ) . length % 2 ) === 1 ) {
163168 addObjects = true ;
177182 }
178183 case 'collisionlayers' :
179184 {
185+ var splits = lineToCursor . toLowerCase ( ) . split ( / [ , \p{ Z} \s ] / u) . filter ( function ( v ) {
186+ return v !== '' ;
187+ } ) ;
188+ toexclude = splits ;
180189 addObjects = true ;
190+ excludeAggregates = true ;
181191 break ;
182192 }
183193 case 'rules' :
312322 //state.legend_properties
313323 //state.objects
314324
315- //if list is a single word and that matches what the current word is, don't show hint
325+ //remove words from the toexclude list
326+ for ( var i = 0 ; i < list . length ; i ++ ) {
327+ var lc = list [ i ] . text . toLowerCase ( ) ;
328+ if ( toexclude . indexOf ( lc ) >= 0 ) {
329+ list . splice ( i , 1 ) ;
330+ i -- ;
331+ }
332+ }
333+ //if list is a single word and that matches what the current word is, don't show hint
316334 if ( list . length === 1 && list [ 0 ] . text . toLowerCase ( ) === curWord ) {
317335 list = [ ] ;
318336 }
Original file line number Diff line number Diff line change @@ -2682,7 +2682,7 @@ function loadFile(str) {
26822682 while ( ss . eol ( ) === false ) ;
26832683 }
26842684
2685- delete state . lineNumber ;
2685+ // delete state.lineNumber;
26862686
26872687 generateExtraMembers ( state ) ;
26882688 generateMasks ( state ) ;
Original file line number Diff line number Diff line change @@ -801,7 +801,7 @@ var codeMirrorFn = function() {
801801 }
802802 if ( splits . indexOf ( candname , 2 ) >= 2 ) {
803803 logError ( "You can't define object " + candname . toUpperCase ( ) + " in terms of itself!" , state . lineNumber ) ;
804- ok = false ;
804+ // ok = false;
805805 }
806806 checkNameNew ( state , candname ) ;
807807 }
You can’t perform that action at this time.
0 commit comments