Hi Arturo,

Interesting request.  But... a vertical bar across the screen is
hard to make -- it would mean having to extend shorter lines with
whitespace to reach the desired column.  What is easier to make
is to color any text that exceeds a certain column.

Attached is a proof of concept.  The "limit" is baked in as 68;
it would of course have to become settable by some option.

This doesn't give you an indication of how many columns you can
still use before reaching the limit, but this is the best I can
do with a simple patch.

Benno

diff --git a/src/winio.c b/src/winio.c
index a4a3df77..8162a3c6 100644
--- a/src/winio.c
+++ b/src/winio.c
@@ -2690,6 +2690,12 @@ void edit_draw(filestruct *fileptr, const char *converted,
 	}
 #endif /* ENABLE_COLOR */
 
+	const char *linetext = converted +  actual_x(converted, 68);;
+
+	wattron(edit, interface_color_pair[ERROR_MESSAGE]);
+	mvwaddnstr(edit, row, margin + 68, linetext, -1);
+	wattroff(edit, interface_color_pair[ERROR_MESSAGE]);
+
 #ifndef NANO_TINY
 	/* If the mark is on, and fileptr is at least partially selected, we
 	 * need to paint it. */

Reply via email to