|
|
@ -195,7 +195,9 @@ impl EditorView {
|
|
|
|
.find_scope_index("diagnostic")
|
|
|
|
.find_scope_index("diagnostic")
|
|
|
|
.or_else(|| theme.find_scope_index("ui.cursor"))
|
|
|
|
.or_else(|| theme.find_scope_index("ui.cursor"))
|
|
|
|
.or_else(|| theme.find_scope_index("ui.selection"))
|
|
|
|
.or_else(|| theme.find_scope_index("ui.selection"))
|
|
|
|
.expect("no selection scope found!");
|
|
|
|
.expect(
|
|
|
|
|
|
|
|
"at least one of the following scopes must be defined in the theme: `diagnostic`, `ui.cursor`, or `ui.selection`",
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
doc.diagnostics()
|
|
|
|
doc.diagnostics()
|
|
|
|
.iter()
|
|
|
|
.iter()
|
|
|
@ -220,7 +222,7 @@ impl EditorView {
|
|
|
|
|
|
|
|
|
|
|
|
let selection_scope = theme
|
|
|
|
let selection_scope = theme
|
|
|
|
.find_scope_index("ui.selection")
|
|
|
|
.find_scope_index("ui.selection")
|
|
|
|
.expect("no selection scope found!");
|
|
|
|
.expect("could not find `ui.selection` scope in the theme!");
|
|
|
|
let base_cursor_scope = theme
|
|
|
|
let base_cursor_scope = theme
|
|
|
|
.find_scope_index("ui.cursor")
|
|
|
|
.find_scope_index("ui.cursor")
|
|
|
|
.unwrap_or(selection_scope);
|
|
|
|
.unwrap_or(selection_scope);
|
|
|
|