From 385014ce5371308a5e4db55a03050a960364c6c1 Mon Sep 17 00:00:00 2001 From: "Michael D. Lowis" Date: Sat, 8 Jul 2017 10:30:19 -0400 Subject: [PATCH] fixed bug where syntax highlighter continues to run even when no language is selected --- tide-hl.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tide-hl.rb b/tide-hl.rb index 3b81328..92e0086 100755 --- a/tide-hl.rb +++ b/tide-hl.rb @@ -153,6 +153,10 @@ end #------------------------------------------------------------------------------- +# bail if theres nothing to highlight +if $language.nil? then exit + +# otherwise start doing the job while (not $stdin.eof?) do # Read in the input chunk $buf = StringIO.new -- 2.49.0