unction findPrev() {
            const query = document.getElementById('saveSearchInput').value;
            if (!editor || !query) return;
            
            // Store current cursor position
            const startPos = editor.getCursor('from');
            
            // Try to find previous occurrence
            const cursor = editor.getSearchCursor(query, startPos);
            if (cursor.findPrevious()) {
                editor.setSelection(cursor.from(), cursor.to());
                editor.sc