nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Nano-devel] [PATCH 2/2] display: highlight the ">"/"<" continuation cha


From: Benno Schulenberg
Subject: [Nano-devel] [PATCH 2/2] display: highlight the ">"/"<" continuation characters in reverse video
Date: Thu, 7 Feb 2019 20:48:52 +0100

To make it obvious that they are not actual characters in the file.

This fulfills https://savannah.gnu.org/bugs/?55571.
---
 src/winio.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/winio.c b/src/winio.c
index 8bb565c0..045cbe1e 100644
--- a/src/winio.c
+++ b/src/winio.c
@@ -2775,10 +2775,16 @@ int update_line(filestruct *fileptr, size_t index)
        edit_draw(fileptr, converted, row, from_col);
        free(converted);
 
-       if (from_col > 0)
+       if (from_col > 0) {
+               wattron(edit, A_REVERSE);
                mvwaddch(edit, row, margin, '<');
-       if (strlenpt(fileptr->data) > from_col + editwincols)
+               wattroff(edit, A_REVERSE);
+       }
+       if (strlenpt(fileptr->data) > from_col + editwincols) {
+               wattron(edit, A_REVERSE);
                mvwaddch(edit, row, COLS - 1, '>');
+               wattroff(edit, A_REVERSE);
+       }
 
        if (spotlighted && !inhelp)
                spotlight(light_from_col, light_to_col);
-- 
2.20.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]