Skip to content

Commit

Permalink
dont fail when there are no errors/warnings, #14783
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieken committed Mar 13, 2018
1 parent 362485e commit e8696be
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/vs/editor/contrib/gotoError/gotoError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,12 @@ class MarkerNavigationAction extends EditorAction {
}

// try with the next/prev file
let oldMarker = model.currentMarker || { resource: editor.getModel().uri, severity: Severity.Error, startLineNumber: 1, startColumn: 1, endLineNumber: 1, endColumn: 1 };
let markers = markerService.read().sort(MarkerNavigationAction.compareMarker);
if (markers.length === 0) {
return undefined;
}

let oldMarker = model.currentMarker || { resource: editor.getModel().uri, severity: Severity.Error, startLineNumber: 1, startColumn: 1, endLineNumber: 1, endColumn: 1 };
let idx = binarySearch(markers, oldMarker, MarkerNavigationAction.compareMarker);
if (idx < 0) {
// find best match...
Expand Down

0 comments on commit e8696be

Please sign in to comment.