Unfold on find
MODIFY
lib/find-view.js
lib/find-view.js
@@ -558,6 +558,9 @@ class FindView {
let ranges = (Array.from(this.markers).map((marker) => marker.getBufferRange()));
let scrollMarker = this.markers[this.firstMarkerIndexAfterCursor().index];
let editor = this.model.getEditor();
+ for(let range of ranges) {
+ editor.unfoldBufferRow(range.start.row);
+ }
editor.setSelectedBufferRanges(ranges, {flash: true});
editor.scrollToBufferPosition(scrollMarker.getStartBufferPosition(), {center: true});
}
@@ -568,6 +571,7 @@ class FindView {
if (marker = this.markers[markerIndex]) {
let editor = this.model.getEditor();
+ let bufferRange = marker.getBufferRange();
let screenRange = marker.getScreenRange();
if (
@@ -584,7 +588,8 @@ class FindView {
}
}
- editor.setSelectedScreenRange(screenRange, {flash: true});
+ editor.unfoldBufferRow(bufferRange.start.row);
+ editor.setSelectedBufferRange(bufferRange, {flash: true});
editor.scrollToCursorPosition({center: true});
}
}

MODIFY
lib/project/results-view.js
lib/project/results-view.js
@@ -452,7 +452,9 @@ class ResultsView {
split: reverseDirections[atom.config.get('find-and-replace.projectSearchResultsPaneSplitDirection')]
})
.then(editor => {
- editor.setSelectedBufferRange(match.range, {autoscroll: true})
+ editor.unfoldBufferRow(match.range[0][0]); // Equivalent to match.range.start.row
+ editor.setSelectedBufferRange(match.range, {flash: true});
+ editor.scrollToCursorPosition();
});
}
} else {

Unfold on find