Fix #47796 "Web IDE autocomplete should be disabled in markdown files"
This commit is contained in:
parent
15ad1a9767
commit
5104098fab
|
@ -12,5 +12,6 @@ export const defaultEditorOptions = {
|
||||||
export default [
|
export default [
|
||||||
{
|
{
|
||||||
readOnly: model => !!model.file.file_lock,
|
readOnly: model => !!model.file.file_lock,
|
||||||
|
quickSuggestions: model => !(model.language === 'markdown'),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: Disabled Web IDE autocomplete suggestions for Markdown files.
|
||||||
|
merge_request:
|
||||||
|
author: Isaac Smith
|
||||||
|
type: fixed
|
|
@ -263,4 +263,23 @@ describe('Multi-file editor library', () => {
|
||||||
expect(instance.isDiffEditorType).toBe(false);
|
expect(instance.isDiffEditorType).toBe(false);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('sets quickSuggestions to false when language is markdown', () => {
|
||||||
|
instance.createInstance(holder);
|
||||||
|
|
||||||
|
spyOn(instance.instance, 'updateOptions').and.callThrough();
|
||||||
|
|
||||||
|
const model = instance.createModel({
|
||||||
|
...file(),
|
||||||
|
key: 'index.md',
|
||||||
|
path: 'index.md',
|
||||||
|
});
|
||||||
|
|
||||||
|
instance.attachModel(model);
|
||||||
|
|
||||||
|
expect(instance.instance.updateOptions).toHaveBeenCalledWith({
|
||||||
|
readOnly: false,
|
||||||
|
quickSuggestions: false,
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue