From e90aa3d851b037c24423ac7eebd23a562e6490e7 Mon Sep 17 00:00:00 2001
From: rswindell <>
Date: Sun, 12 Apr 2020 01:34:13 +0000
Subject: [PATCH] Added AutoAreas option (to global section), set to a
 comma-separated list of Library names (case-sensitive) for which you would
 like to have their directories automatically added to your tickit area list.
 Directories whose names are invalid area tags (e.g. contain a space) are not
 included.

---
 exec/load/fidocfg.js | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/exec/load/fidocfg.js b/exec/load/fidocfg.js
index 905e5d3e63..f15d4b842e 100644
--- a/exec/load/fidocfg.js
+++ b/exec/load/fidocfg.js
@@ -75,6 +75,15 @@ function TickITCfg() {
 		if (require(this.gcfg.handler, tmp, "Handle_TIC") == null)
 			delete this.gcfg.handler;
 	}
+	var auto_areas = tcfg.iniGetValue(null, "AutoAreas", []);
+	for(var code in file_area.dir) {
+		var dir = file_area.dir[code];
+		if(auto_areas.indexOf(dir.lib_name) < 0)
+			continue;
+		if(dir.name.indexOf(' ') >= 0) // Invalid areatag
+			continue;
+		this.acfg[dir.name.toLowerCase()] = { dir: code };
+	}
 	sects = tcfg.iniGetSections();
 	for (i=0; i<sects.length; i++) {
 		this.acfg[sects[i].toLowerCase()] = tcfg.iniGetObject(sects[i]);
-- 
GitLab