From 88771a2c1d7cfbf05e5521295dba972c73c95dae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morel=20B=C3=A9renger?= Date: Wed, 25 May 2016 01:53:24 +0200 Subject: [PATCH 2/2] fixed the first line of the screen being always highlighted TODO: fix the first line of the *file* being always highlighted --- cgdb/sources.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cgdb/sources.c b/cgdb/sources.c index 3a0f5cc..57bed24 100644 --- a/cgdb/sources.c +++ b/cgdb/sources.c @@ -592,7 +592,7 @@ int source_display(struct sviewer *sview, int focus) else if (line < 0) line = 0; } - int run_line = 0; + int run_line = -1; /* Print 'height' lines of the file, starting at 'line' */ lwidth = (int) log10(sview->cur->buf.length) + 1; @@ -736,7 +736,7 @@ int source_display(struct sviewer *sview, int focus) } bool config_reverse_exec_line = cgdbrc_get(CGDBRC_REVERSE_EXEC_LINE)->variant.int_val; - if (config_reverse_exec_line) { + if (config_reverse_exec_line && run_line != -1) { mvwchgat(sview->win, run_line, lwidth + 2, getmaxx(sview->win) - lwidth - 2, A_REVERSE, 0, NULL); } -- 2.1.4