aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2021-05-23 08:07:35 +0200
committerTristan Gingold <tgingold@free.fr>2021-05-23 08:07:35 +0200
commit7c28c0c7ca48edcda4ff7c390c864cb1396eb1d8 (patch)
treea08bafa5a5267320b2dbd2f282de1df02ff24e83
parent8ef3af5bfc135e63ac76315a863e71690f0b0b73 (diff)
downloadghdl-7c28c0c7ca48edcda4ff7c390c864cb1396eb1d8.tar.gz
ghdl-7c28c0c7ca48edcda4ff7c390c864cb1396eb1d8.tar.bz2
ghdl-7c28c0c7ca48edcda4ff7c390c864cb1396eb1d8.zip
files_map: adjust computation of column for tabs
-rw-r--r--src/files_map.adb3
-rwxr-xr-xtestsuite/gna/issue314/testsuite.sh4
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