From aa10b93c6a3508b2a34150137fe22d3ded1fc9d0 Mon Sep 17 00:00:00 2001 From: g00r00 Date: Wed, 2 Oct 2013 20:39:05 -0400 Subject: [PATCH] reformat paragraph (ctrl-B) now matches linewrap length in reguar word wrapping, pasting urls longer than 80 chars from clipboard now works as expected --- mystic/bbs_edit_ansi.pas | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mystic/bbs_edit_ansi.pas b/mystic/bbs_edit_ansi.pas index bb93f0e..d9cea7e 100644 --- a/mystic/bbs_edit_ansi.pas +++ b/mystic/bbs_edit_ansi.pas @@ -191,7 +191,7 @@ Var Begin Result := False; - If GetLineLength(ANSI.Data[Line], 80) >= Rowsize Then Begin + If GetLineLength(ANSI.Data[Line], 80) >= RowSize Then Begin Result := True; Exit; @@ -1347,7 +1347,7 @@ Begin If JoinLen = 0 Then Break; - If LineLen + JoinLen <= RowSize Then Begin + If LineLen + JoinLen < RowSize Then Begin Move (ANSI.Data[Line + 1], ANSI.Data[Line][LineLen + 2], SizeOf(RecAnsiBufferChar) * JoinLen); ANSI.Data[Line][LineLen + 1].Ch := ' '; @@ -1476,7 +1476,8 @@ Begin End; #32.. #254 : If (CurLength >= RowSize) and (GetWrapPos(ANSI.Data[CurLine], RowSize, RowSize) = 0) And InsertMode Then Begin - // dont do anything + DoEnter; + DoChar(Ch); End Else If (CurX = 1) and (Ch = '/') and (Not DrawMode) Then Begin EditorCommands;