From 3e7ca8e922417004e3422553c1509feddd70f878 Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Sat, 4 Apr 2020 17:44:27 -0700 Subject: [PATCH] make grammar loading more deterministic --- babi/highlight.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/babi/highlight.py b/babi/highlight.py index 233765a..e701e03 100644 --- a/babi/highlight.py +++ b/babi/highlight.py @@ -657,7 +657,7 @@ class Grammars: os.path.splitext(filename)[0]: os.path.join(directory, filename) for directory in directories if os.path.exists(directory) - for filename in os.listdir(directory) + for filename in sorted(os.listdir(directory)) if filename.endswith('.json') }