From 7c28c0c7ca48edcda4ff7c390c864cb1396eb1d8 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sun, 23 May 2021 08:07:35 +0200 Subject: files_map: adjust computation of column for tabs --- src/files_map.adb | 3 +-- testsuite/gna/issue314/testsuite.sh | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/files_map.adb b/src/files_map.adb index 4cb6d82bf..df62f2155 100644 --- a/src/files_map.adb +++ b/src/files_map.adb @@ -175,9 +175,8 @@ package body Files_Map is for I in Line_Pos .. Line_Pos + Source_Ptr (Offset) - 1 loop if Source_File.Source (I) = ASCII.HT then Res := Res + Tab_Stop - Res mod Tab_Stop; - else - Res := Res + 1; end if; + Res := Res + 1; end loop; return Res; end if; diff --git a/testsuite/gna/issue314/testsuite.sh b/testsuite/gna/issue314/testsuite.sh index 2208f2533..d74941513 100755 --- a/testsuite/gna/issue314/testsuite.sh +++ b/testsuite/gna/issue314/testsuite.sh @@ -3,10 +3,10 @@ . ../../testenv.sh analyze_failure t1.vhdl 2> t1.err -grep 2:8 t1.err +grep 2:9 t1.err analyze_failure -ftabstop=4 t1.vhdl 2> t1.err -grep 2:4 t1.err +grep 2:5 t1.err analyze_failure -fcaret-diagnostics -ftabstop=4 t1.vhdl 2> t1.err grep "^ err;" t1.err -- cgit v1.2.3