@@ -6,6 +6,7 @@ import fsOperation from "fileSystem";
66import actions from "handlers/quickTools" ;
77import actionStack from "lib/actionStack" ;
88import constants from "lib/constants" ;
9+ import EditorFile from "lib/editorFile" ;
910import lang from "lib/lang" ;
1011import openFile from "lib/openFile" ;
1112import appSettings from "lib/settings" ;
@@ -157,7 +158,7 @@ export default function otherSettings() {
157158 {
158159 key : "excludeFolders" ,
159160 text : strings [ "exclude files" ] ,
160- value : values . excludeFolders . join ( "\n" ) ,
161+ /* value: values.excludeFolders.join("\n"),
161162 prompt: strings["exclude files"],
162163 promptType: "textarea",
163164 promptOptions: {
@@ -166,7 +167,7 @@ export default function otherSettings() {
166167 return item.trim().length > 0;
167168 });
168169 },
169- } ,
170+ },*/
170171 } ,
171172 {
172173 key : "defaultFileEncoding" ,
@@ -261,11 +262,24 @@ export default function otherSettings() {
261262 break ;
262263
263264 case "excludeFolders" :
264- value = value
265- . split ( "\n" )
266- . map ( ( item ) => item . trim ( ) )
267- . filter ( ( item ) => item . length > 0 ) ;
268- break ;
265+ actionStack . pop ( actionStack . length ) ;
266+ const editor = new EditorFile ( strings [ "exclude files" ] , {
267+ text : values . excludeFolders . join ( "\n" ) ,
268+ } ) ;
269+ editor . onsave = function ( event ) {
270+ event . preventDefault ( ) ;
271+ const data = editor . session . getValue ( ) ;
272+
273+ appSettings . update ( {
274+ [ key ] : data
275+ . split ( "\n" )
276+ . map ( ( item ) => item . trim ( ) )
277+ . filter ( ( item ) => item . length > 0 ) ,
278+ } ) ;
279+
280+ editor . isUnsaved = false ;
281+ } ;
282+ return ;
269283
270284 default :
271285 break ;
0 commit comments