From 1a3c6a2f9cb6175e954a8fabd59fe9ed9424017e Mon Sep 17 00:00:00 2001 From: mysticbbs Date: Wed, 15 Feb 2012 01:10:00 -0500 Subject: [PATCH] Backspace now moves back to the previous link. In addition, if there is no previous page, both a @PREV link and backspace will attempt to get back to the starting KEYWORD before finally resorting to INDEX --- mystic/bbs_ansi_help.pas | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/mystic/bbs_ansi_help.pas b/mystic/bbs_ansi_help.pas index a80f684..4df3a4b 100644 --- a/mystic/bbs_ansi_help.pas +++ b/mystic/bbs_ansi_help.pas @@ -364,10 +364,27 @@ Begin End; End Else Begin Case Ch of + #08 : Begin + If LastPos = 0 Then + CurKey := Keyword + Else Begin + CurKey := LastKey[LastPos]; + Dec (LastPos); + End; + + OK := ReadKeywordData; + + If Not OK Then Begin + CurKey := 'INDEX'; + OK := ReadKeywordData; + End; + + Break; + End; #13 : If Text[TopPage + CurLine - 1].Links > 0 Then Begin If Text[TopPage + CurLine - 1].Link[CurLPos].Key = '@PREV' Then Begin If LastPos = 0 Then - CurKey := 'INDEX' + CurKey := Keyword Else Begin CurKey := LastKey[LastPos]; Dec (LastPos);