diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:11:51 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:11:51 +0000 |
commit | a6f3675fc4e21b3f899286b9a02005368d913f74 (patch) | |
tree | c9bfa92b223783ff03b8e941c3bb0d36c68d3b5e /src/editor/editdraw.c | |
parent | Releasing progress-linux version 3:4.8.30-1~progress7.99u1. (diff) | |
download | mc-a6f3675fc4e21b3f899286b9a02005368d913f74.tar.xz mc-a6f3675fc4e21b3f899286b9a02005368d913f74.zip |
Merging upstream version 3:4.8.31.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/editor/editdraw.c')
-rw-r--r-- | src/editor/editdraw.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/editor/editdraw.c b/src/editor/editdraw.c index fbd1e09..49be571 100644 --- a/src/editor/editdraw.c +++ b/src/editor/editdraw.c @@ -1,7 +1,7 @@ /* Editor text drawing. - Copyright (C) 1996-2023 + Copyright (C) 1996-2024 Free Software Foundation, Inc. Written by: @@ -448,7 +448,6 @@ print_to_widget (WEdit * edit, long row, int start_col, int start_col_real, { int style; unsigned int textchar; - int color; if (cols_to_skip != 0) { @@ -458,8 +457,6 @@ print_to_widget (WEdit * edit, long row, int start_col, int start_col_real, style = p->style & 0xFF00; textchar = p->ch; - /* If non-printable - use black background */ - color = (style & MOD_ABNORMAL) != 0 ? 0 : p->style >> 16; if ((style & MOD_WHITESPACE) != 0) { @@ -475,8 +472,10 @@ print_to_widget (WEdit * edit, long row, int start_col, int start_col_real, tty_setcolor (EDITOR_BOLD_COLOR); else if ((style & MOD_MARKED) != 0) tty_setcolor (EDITOR_MARKED_COLOR); + else if ((style & MOD_ABNORMAL) != 0) + tty_setcolor (EDITOR_NONPRINTABLE_COLOR); else - tty_lowlevel_setcolor (color); + tty_lowlevel_setcolor (p->style >> 16); if (edit_options.show_right_margin) { @@ -951,9 +950,8 @@ render_edit_text (WEdit * edit, long start_row, long start_column, long end_row, if ((force & REDRAW_LINE_ABOVE) != 0 && curs_row >= 1) { row = curs_row - 1; - b = edit_buffer_get_backward_offset (&edit->buffer, - edit_buffer_get_current_bol (&edit->buffer), - 1); + b = edit_buffer_get_current_bol (&edit->buffer); + b = edit_buffer_get_backward_offset (&edit->buffer, b, 1); if (row >= start_row && row <= end_row) { if (key_pending (edit)) |