mirror of
https://github.com/fadden/6502bench.git
synced 2025-07-16 03:24:08 +00:00
Warn about multi-line start/stop tags
One of the most confusing things you can do is select a bunch of lines and apply a code start tag (nee "code hint"). We now ask for confirmation when applying start/stop hints to multiple lines. (issue #89)
This commit is contained in:
@@ -3379,7 +3379,19 @@ namespace SourceGen {
|
||||
sel.Add(offset);
|
||||
}
|
||||
}
|
||||
|
||||
// "first byte only" is used for code start/stop tags, which should only be
|
||||
// placed at the start of a region.
|
||||
if (sel.Count > 1) {
|
||||
MessageBoxResult result = MessageBox.Show(Res.Strings.ANALYZER_TAG_MULTI_CHK,
|
||||
Res.Strings.CONFIRMATION_NEEDED,
|
||||
MessageBoxButton.OKCancel, MessageBoxImage.Question);
|
||||
if (result == MessageBoxResult.Cancel) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Inline data or none. Select all bytes.
|
||||
sel = OffsetSetFromSelected();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user