summaryrefslogtreecommitdiff
path: root/docview/src
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2011-02-07 15:47:38 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2011-02-07 15:47:38 +0200
commit30f91134faa212fd2b47e224aa47112f9343f48c (patch)
treee2cb4cf2a702892576ba12dba4f969eaa2503e18 /docview/src
parentcfbd9ff68dc97975024e6d8d0b0eeeb333ab3548 (diff)
downloadfpGUI-30f91134faa212fd2b47e224aa47112f9343f48c.tar.xz
bugfix: Loading user notes lots LineEnding prefixes.
Notes are now loaded, exactly like they were saved.
Diffstat (limited to 'docview/src')
-rw-r--r--docview/src/frm_main.pas5
1 files changed, 4 insertions, 1 deletions
diff --git a/docview/src/frm_main.pas b/docview/src/frm_main.pas
index 4fc35709..83485729 100644
--- a/docview/src/frm_main.pas
+++ b/docview/src/frm_main.pas
@@ -1574,6 +1574,7 @@ var
s: TfpgString;
lReadTopicIndex: boolean;
lReadInsertPoint: boolean;
+ lNoteTextStarted: boolean;
begin
ProfileEvent( 'Load notes for ' + AHelpFile.Filename );
@@ -1599,6 +1600,7 @@ begin
i := 0;
repeat
{ reset variables }
+ lNoteTextStarted := False;
TopicIndex := -1;
InsertPoint := -1;
NoteText := '';
@@ -1640,10 +1642,11 @@ begin
end
else
begin
- if NoteText <> '' then
+ if lNoteTextStarted then
NoteText := NoteText + LineEnding + s
else
NoteText := s;
+ lNoteTextStarted := True;
end;
until s = '#ENDNOTE#';