diff --git a/bhl.inc.php b/bhl.inc.php index f45405b..199af46 100644 --- a/bhl.inc.php +++ b/bhl.inc.php @@ -360,7 +360,19 @@ function bhl_clean_cache() function bhl_show_position($line, $row, array $lines) { if($line > 0 && $line <= count($lines)) - return $lines[$line-1].str_repeat('-', $row)."^"; + { + //handling tabs + $hint = str_replace("\t", " ", $lines[$line-1]); + for($c=0;$c<$row;++$c) + { + if($lines[$line-1][$c] === "\t") + $hint .= "----"; + else + $hint .= "-"; + } + $hint .= "^"; + return $hint; + } else return "??? @($line:$row)"; }