Save() {
            const query = document.getElementById('saveSearchInput').value;
            if (!editor || !query) return;
            
            currentSearchPos = null;
            const cursor = editor.getSearchCursor(query);
            if (cursor.findNext()) {
                currentSearchPos = cursor.from();
                editor.setSelection(cursor.from(), cursor.to());
                editor.scrollIntoView(cursor.from(), 20);
            }
        }

        function findNext() {
           