From 39d576c7990b7e5d4713d25cf0a88eb62d432c6d Mon Sep 17 00:00:00 2001 From: Sam Vervaeck Date: Sat, 27 May 2023 18:48:44 +0200 Subject: [PATCH] Print a Unicode arrow when TextRange is empty in diagnostics --- src/Diagnostics.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Diagnostics.cc b/src/Diagnostics.cc index 72a5354cf..14225edfe 100644 --- a/src/Diagnostics.cc +++ b/src/Diagnostics.cc @@ -325,8 +325,12 @@ namespace bolt { Out << ' '; } setForegroundColor(HighlightColor); - for (std::size_t i = start_column; i < end_column; i++) { - Out << '~'; + if (start_column == end_column) { + Out << "↖"; + } else { + for (std::size_t i = start_column; i < end_column; i++) { + Out << '~'; + } } resetStyles(); Out << '\n';