From e54312ce0df4f6907dd1b09fe0db1c3dbda7d23d Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Tue, 6 Apr 2010 09:11:22 +0200 Subject: memo: Fixed deletion of selected lines. Thanks to JoshyFun for suggestions. --- src/gui/fpg_memo.pas | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/gui/fpg_memo.pas b/src/gui/fpg_memo.pas index 3e972430..bbc4b4ca 100644 --- a/src/gui/fpg_memo.pas +++ b/src/gui/fpg_memo.pas @@ -403,8 +403,9 @@ begin SetLineText(selsl, ls); end; - for n := selsl to selel do - FLines.Delete(n); + //delete moves lines up, so delete same line number over and over. + for n := (selsl+1) to selel do + FLines.Delete(selsl+1); FCursorPos := selsp; FCursorLine := selsl; -- cgit v1.2.3-70-g09d2