Hide Intel ASM syntax option for non-ASM languages (fixes #8279) (#8280)

This commit is contained in:
Josh Brice
2025-12-09 17:54:09 -06:00
committed by GitHub
parent eb752bc202
commit 2fe4d972d1
2 changed files with 10 additions and 1 deletions

View File

@@ -2691,7 +2691,15 @@ export class Compiler extends MonacoPane<monaco.editor.IStandaloneCodeEditor, Co
);
};
const isIntelFilterDisabled = !this.compiler.supportsIntel && !filters.binary && !filters.binaryObject;
this.filterIntelButton.prop('disabled', isIntelFilterDisabled);
// Hide the Intel syntax option for languages where it doesn't make sense (e.g., Java, Go)
// unless we're in binary mode (which uses objdump that might support Intel syntax)
const shouldHideIntelFilter = isIntelFilterDisabled;
if (shouldHideIntelFilter) {
this.filterIntelButton.parent().hide();
} else {
this.filterIntelButton.parent().show();
this.filterIntelButton.prop('disabled', isIntelFilterDisabled);
}
formatFilterTitle(this.filterIntelButton, this.filterIntelTitle);
// Disable binaryObject support on compilers that don't work with it or if binary is selected