@@ -24,7 +24,7 @@ export interface Settings extends Index {
24
24
editorFontSize : number ; // `editor.fontSize`
25
25
themeId : string ; // `workbench.colorTheme`
26
26
autoSave : 'on' | 'off' ; // `editor.autoSave`
27
- quickSuggestions : Record < 'other' | 'comments' | 'strings' , boolean > ; // `editor.quickSuggestions`
27
+ quickSuggestions : Record < 'other' | 'comments' | 'strings' , boolean > ; // `editor.quickSuggestions`
28
28
29
29
autoScaleInterface : boolean ; // `arduino.window.autoScale`
30
30
interfaceScale : number ; // `arduino.window.zoomLevel` https://github.com/eclipse-theia/theia/issues/8751
@@ -100,9 +100,9 @@ export class SettingsService {
100
100
this . preferenceService . get < string > ( 'workbench.colorTheme' , 'arduino-theme' ) ,
101
101
this . preferenceService . get < 'on' | 'off' > ( 'editor.autoSave' , 'on' ) ,
102
102
this . preferenceService . get < object > ( 'editor.quickSuggestion' , {
103
- 'other' : false ,
104
- 'comments' : false ,
105
- 'strings' : false
103
+ 'other' : false ,
104
+ 'comments' : false ,
105
+ 'strings' : false
106
106
} ) ,
107
107
this . preferenceService . get < boolean > ( 'arduino.window.autoScale' , true ) ,
108
108
this . preferenceService . get < number > ( 'arduino.window.zoomLevel' , 0 ) ,
@@ -569,18 +569,18 @@ export class SettingsComponent extends React.Component<SettingsComponent.Props,
569
569
} ;
570
570
571
571
protected quickSuggestionsOtherDidChange = ( event : React . ChangeEvent < HTMLInputElement > ) => {
572
-
573
- // need to persist react events through lifecycle https://reactjs.org/docs/events.html#event-pooling
574
- const newVal = event . target . checked ? true : false
575
-
576
- this . setState ( prevState => {
577
- return {
578
- quickSuggestions : {
579
- ...prevState . quickSuggestions ,
580
- other : newVal
581
- }
582
- }
583
- } ) ;
572
+
573
+ // need to persist react events through lifecycle https://reactjs.org/docs/events.html#event-pooling
574
+ const newVal = event . target . checked ? true : false
575
+
576
+ this . setState ( prevState => {
577
+ return {
578
+ quickSuggestions : {
579
+ ...prevState . quickSuggestions ,
580
+ other : newVal
581
+ }
582
+ }
583
+ } ) ;
584
584
} ;
585
585
586
586
protected themeDidChange = ( event : React . ChangeEvent < HTMLSelectElement > ) => {
@@ -823,7 +823,7 @@ export class AdditionalUrlsDialog extends AbstractDialog<string[]> {
823
823
}
824
824
825
825
get value ( ) : string [ ] {
826
- return this . textArea . value . split ( '\n' ) . map ( url => url . trim ( ) ) ;
826
+ return this . textArea . value . split ( '\n' ) . map ( url => url . trim ( ) ) . filter ( url => ! ! url ) ;
827
827
}
828
828
829
829
protected onAfterAttach ( message : Message ) : void {
0 commit comments