From 73144f04bd9b0917d07e366c6a5216811fac078c Mon Sep 17 00:00:00 2001
From: deuce <>
Date: Tue, 10 Feb 2009 01:42:09 +0000
Subject: [PATCH] When a line is deleted via unwrap_line() also draw one line
 last the total count of lines after to operation to erase on-screen leftover
 lines.

Fixes bug reported by DigitalMan
---
 exec/fseditor.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/exec/fseditor.js b/exec/fseditor.js
index 1e5df600af..18db5d99ba 100644
--- a/exec/fseditor.js
+++ b/exec/fseditor.js
@@ -312,7 +312,7 @@ function unwrap_line(l)
 	}
 	if(old_lines!=line.length) {
 		/* We need to redraw everything... line(s) deleted */
-		for(;l<line.length;l++)
+		for(;l<=line.length;l++)
 			draw_line(l);
 	}
 	return(ret);
@@ -1532,8 +1532,9 @@ function edit(quote_first)
 						line[ypos].hardcr=false;
 					}
 				}
-				if(!rewrap())
+				if(!rewrap()) {
 					draw_line(ypos,xpos);
+				}
 				break;
 			case '\x09':	/* CTRL-I TAB... ToDo expand to spaces */
 				add_char(' ');
-- 
GitLab