char prevChar= fDocument.getChar(fOffset - 1);
char prevChar= fDocument.getChar(Math.max(fOffset - 1, 0));
	protected boolean matchPairsAt() {		int i;		int pairIndex1= fPairs.length;		int pairIndex2= fPairs.length;		fStartPos= -1;		fEndPos= -1;		// get the chars preceding and following the start position		try {			char prevChar= fDocument.getChar(fOffset - 1);			char nextChar= fDocument.getChar(fOffset);			// search for opening peer character next to the activation point			for (i= 0; i < fPairs.length; i= i + 2) {				if (nextChar == fPairs[i]) {					fStartPos= fOffset;					pairIndex1= i;				} else if (prevChar == fPairs[i]) {					fStartPos= fOffset - 1;					pairIndex1= i;				}			}						// search for closing peer character next to the activation point			for (i= 1; i < fPairs.length; i= i + 2) {				if (prevChar == fPairs[i]) {					fEndPos= fOffset - 1;					pairIndex2= i;				} else if (nextChar == fPairs[i]) {					fEndPos= fOffset;					pairIndex2= i;				}			}			if (fEndPos > -1) {				fAnchor= RIGHT;				fStartPos= searchForOpeningPeer(fEndPos, fPairs[pairIndex2 - 1], fPairs[pairIndex2], fDocument);				if (fStartPos > -1)					return true;				else					fEndPos= -1;			}	else if (fStartPos > -1) {				fAnchor= LEFT;				fEndPos= searchForClosingPeer(fStartPos, fPairs[pairIndex1], fPairs[pairIndex1 + 1], fDocument);				if (fEndPos > -1)					return true;				else					fStartPos= -1;			}		} catch (BadLocationException x) {		} catch (IOException x) {		}		return false;	}