From 697164a477217e7743fa1b7a1f5f63b5aa406a8f Mon Sep 17 00:00:00 2001
From: deuce <>
Date: Fri, 8 Apr 2005 21:32:09 +0000
Subject: [PATCH] More line count fixes.

---
 src/uifc/uifc32.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/uifc/uifc32.c b/src/uifc/uifc32.c
index 2ffd02d7d3..6590597f5f 100644
--- a/src/uifc/uifc32.c
+++ b/src/uifc/uifc32.c
@@ -2320,8 +2320,11 @@ void showbuf(int mode, int left, int top, int width, int height, char *title, ch
 	lines=0;
 	k=0;
 	for(j=0;j<len;j++) {
-		if(hbuf[j]!=CR)
-			k++;
+		k++;
+		if(mode&WIN_HLP && (hbuf[j]==2 || hbuf[j]=='~' || hbuf[j]==1 || hbuf[j]=='`'))
+			k--;
+		if(hbuf[j]==CR)
+			k--;
 		if((hbuf[j]==LF) || (k>width-2-pad-pad && (hbuf[j+1]!='\n' && hbuf[j+1]!='\r'))) {
 			k=0;
 			lines++;
-- 
GitLab