From 781df9b97296d92e6a3827152505ea785db6ebd5 Mon Sep 17 00:00:00 2001 From: faissaloo Date: Mon, 4 Jul 2016 13:02:30 +0100 Subject: [PATCH 02/20] Bugfix for sudden size increase causing refresh --- src/revision.h | 2 +- src/winio.c | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/revision.h b/src/revision.h index dc1c99a..0b1949a 100644 --- a/src/revision.h +++ b/src/revision.h @@ -1 +1 @@ -#define REVISION "v2.6.1-24-g4957c11" +#define REVISION "v2.6.1-25-g81c2936" diff --git a/src/winio.c b/src/winio.c index a0a040e..98d97c2 100644 --- a/src/winio.c +++ b/src/winio.c @@ -2285,7 +2285,12 @@ void edit_draw(filestruct *fileptr, const char *converted, int #ifndef DISABLE_LINE_NUM if (ISSET(LINE_NUM)) { - margin = intlen(openfile->filebot->lineno)+3; + if (margin!=intlen(openfile->filebot->lineno)+3) + { + refresh_needed = TRUE; + margin = intlen(openfile->filebot->lineno)+3; + } + //Wouldn't it be cool if we added an option for hex representation? wattron(edit,A_BOLD); mvwprintw(edit,line,margin-(intlen(((long)openfile->edittop->lineno)+line)+2),"%i│",((long)openfile->edittop->lineno)+line); @@ -2293,8 +2298,12 @@ void edit_draw(filestruct *fileptr, const char *converted, int } else if (ISSET(HEX_LINE_NUM)) { - margin = hexlen(openfile->filebot->lineno)+3; - //Wouldn't it be cool if we added an option for hex representation? + if (margin!=hexlen(openfile->filebot->lineno)+3) + { + refresh_needed = TRUE; + margin = hexlen(openfile->filebot->lineno)+3; + } + wattron(edit,A_BOLD); mvwprintw(edit,line,margin-(hexlen(((long)openfile->edittop->lineno)+line)+2),"%X│",((long)openfile->edittop->lineno)+line); wattroff(edit,A_BOLD); -- 2.7.4