From 98aee7f8b9a34c639352034087ac31193256b898 Mon Sep 17 00:00:00 2001
From: Daniel Shahaf <d.s@daniel.shahaf.name>
Date: Mon, 26 Oct 2015 06:30:14 +0000
Subject: [PATCH] Remove path_approx.

Fixes zsh-users/zsh-syntax-highlighting#187.
Adds a test for zsh-users/zsh-syntax-highlighting#204.
---
 highlighters/main/README.md                   | 1 -
 highlighters/main/main-highlighter.zsh        | 4 ----
 highlighters/main/test-data/empty-command.zsh | 3 +--
 3 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/highlighters/main/README.md b/highlighters/main/README.md
index 3a65af3..c903b26 100644
--- a/highlighters/main/README.md
+++ b/highlighters/main/README.md
@@ -34,7 +34,6 @@ This highlighter defines the following styles:
 * `hashed-command` - hashed commands
 * `path` - paths
 * `path_prefix` - path prefixes
-* `path_approx` - approximated paths
 * `globbing` - globbing expressions (`*.txt`)
 * `history-expansion` - history expansion expressions (`!foo` and `^foo^bar`)
 * `single-hyphen-option` - single hyphen options (-o)
diff --git a/highlighters/main/main-highlighter.zsh b/highlighters/main/main-highlighter.zsh
index 0dbbc21..59fdd84 100644
--- a/highlighters/main/main-highlighter.zsh
+++ b/highlighters/main/main-highlighter.zsh
@@ -42,7 +42,6 @@
 : ${ZSH_HIGHLIGHT_STYLES[hashed-command]:=fg=green}
 : ${ZSH_HIGHLIGHT_STYLES[path]:=underline}
 : ${ZSH_HIGHLIGHT_STYLES[path_prefix]:=underline}
-: ${ZSH_HIGHLIGHT_STYLES[path_approx]:=fg=yellow,underline}
 : ${ZSH_HIGHLIGHT_STYLES[globbing]:=fg=blue}
 : ${ZSH_HIGHLIGHT_STYLES[history-expansion]:=fg=blue}
 : ${ZSH_HIGHLIGHT_STYLES[single-hyphen-option]:=none}
@@ -285,9 +284,6 @@ _zsh_highlight_main_highlighter_check_path()
     local -a tmp
     tmp=( ${expanded_path}*(N) )
     (( $#tmp > 0 )) && style_override=path_prefix && return 0
-    # or maybe an approximate path?
-    tmp=( (#a1)${expanded_path}*(N) )
-    (( $#tmp > 0 )) && style_override=path_approx && return 0
   fi
 
   # It's not a path.
diff --git a/highlighters/main/test-data/empty-command.zsh b/highlighters/main/test-data/empty-command.zsh
index 26265a7..9e4b13f 100644
--- a/highlighters/main/test-data/empty-command.zsh
+++ b/highlighters/main/test-data/empty-command.zsh
@@ -27,8 +27,7 @@
 # vim: ft=zsh sw=2 ts=2 et
 # -------------------------------------------------------------------------------------------------
 
-# without the trailing space, it's highlighted as path_approx (issue #187, issue #204)
-BUFFER='echo; ; '
+BUFFER='echo; ;'
 
 expected_region_highlight=(
   "5 5 $ZSH_HIGHLIGHT_STYLES[commandseparator]" # ;