Print a Unicode arrow when TextRange is empty in diagnostics

This commit is contained in:
Sam Vervaeck 2023-05-27 18:48:44 +02:00
parent cc24825ef1
commit 39d576c799
Signed by: samvv
SSH key fingerprint: SHA256:dIg0ywU1OP+ZYifrYxy8c5esO72cIKB+4/9wkZj1VaY

View file

@ -325,8 +325,12 @@ namespace bolt {
Out << ' '; Out << ' ';
} }
setForegroundColor(HighlightColor); setForegroundColor(HighlightColor);
for (std::size_t i = start_column; i < end_column; i++) { if (start_column == end_column) {
Out << '~'; Out << "";
} else {
for (std::size_t i = start_column; i < end_column; i++) {
Out << '~';
}
} }
resetStyles(); resetStyles();
Out << '\n'; Out << '\n';