finos / kdb-studio

Studio for kdb+ / Rapid execution environment for q
Apache License 2.0
18 stars 12 forks source link

Replace skips every second occurrence #108

Closed gyorokpeter closed 2 years ago

gyorokpeter commented 2 years ago

Recommended fix:

        boolean searchFromSelStart;
        if (context.getReplaceWith() != null) {
            searchFromSelStart = context.getSearchForward();
        } else {
            searchFromSelStart = ! context.getSearchForward();
        }
        int pos = searchFromSelStart ? textArea.getSelectionStart() : textArea.getSelectionEnd();