Added method to get text around the cursor.