mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2025-01-11 08:30:02 +00:00
verilog: expand gutter when inline asm
This commit is contained in:
parent
c2a6417e28
commit
88186cf9f2
@ -63,15 +63,16 @@ export class SourceEditor implements ProjectView {
|
|||||||
var div = document.createElement('div');
|
var div = document.createElement('div');
|
||||||
div.setAttribute("class", "editor");
|
div.setAttribute("class", "editor");
|
||||||
parent.appendChild(div);
|
parent.appendChild(div);
|
||||||
this.newEditor(div);
|
var asmOverride = text && this.mode=='verilog' && /__asm\b([\s\S]+?)\b__endasm\b/.test(text);
|
||||||
|
this.newEditor(div, asmOverride);
|
||||||
if (text)
|
if (text)
|
||||||
this.setText(text); // TODO: this calls setCode() and builds... it shouldn't
|
this.setText(text); // TODO: this calls setCode() and builds... it shouldn't
|
||||||
this.setupEditor();
|
this.setupEditor();
|
||||||
return div;
|
return div;
|
||||||
}
|
}
|
||||||
|
|
||||||
newEditor(parent:HTMLElement) {
|
newEditor(parent:HTMLElement, isAsmOverride?:boolean) {
|
||||||
var isAsm = this.mode=='6502' || this.mode =='z80' || this.mode=='jsasm' || this.mode=='gas'; // TODO
|
var isAsm = isAsmOverride || this.mode=='6502' || this.mode =='z80' || this.mode=='jsasm' || this.mode=='gas'; // TODO
|
||||||
var lineWrap = this.mode=='markdown';
|
var lineWrap = this.mode=='markdown';
|
||||||
this.editor = CodeMirror(parent, {
|
this.editor = CodeMirror(parent, {
|
||||||
theme: 'mbo',
|
theme: 'mbo',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user