From 1b70f687fa8e87c705f3930f192b9a9d011bb149 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Sat, 20 Apr 2019 18:25:21 +0200 Subject: diagnostics: fix styling issues Single point locations (equal boundaries) are troublesome, and we were incorrectly ending the style in their case. Which results in an abort in libtextstyle. There is also a confusion between columns as displayed on the screen (which take into account multibyte characters and tabulations), and the number of bytes. Counting the screen-column incrementally (character by character) is uneasy (because of multibyte characters), and I don't want to maintain a buffer of the current line when displaying the diagnostic. So I believe the simplest solution is to track the byte number in addition to the screen column. * src/location.h, src/location.c (boundary): Add the byte-column. Adjust dependencies. * src/getargs.c, src/scan-gram.l: Adjust. * tests/diagnostics.at: Check zero-width locations. --- gnulib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnulib') diff --git a/gnulib b/gnulib index 0d8714b7..d6af2417 160000 --- a/gnulib +++ b/gnulib @@ -1 +1 @@ -Subproject commit 0d8714b7ced8e0e524014c57eb884a170d62cf43 +Subproject commit d6af24178ca4b952327226ad64a4daad8e19109f -- cgit v1.2.1