Allow using a different source range for suggestions than the error message (#5442)
Signed-off-by: Nick Cameron <nrc@ncameron.org>
This commit is contained in:
@ -285,7 +285,11 @@ export function complilationErrorsToDiagnostics(
|
||||
name: suggestion.title,
|
||||
apply: (view: EditorView, from: number, to: number) => {
|
||||
view.dispatch({
|
||||
changes: { from, to, insert: suggestion.insert },
|
||||
changes: {
|
||||
from: suggestion.source_range[0],
|
||||
to: suggestion.source_range[1],
|
||||
insert: suggestion.insert,
|
||||
},
|
||||
})
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user