mirror of
https://github.com/haven1433/HexManiacAdvance.git
synced 2026-10-02 13:16:35 -05:00
Ascii improvements
* Backspace on an ascii run behaves better. * Ascii run has right-click -> remove format option
This commit is contained in:
@@ -613,18 +613,19 @@ namespace HavenSoft.HexManiac.Core.ViewModels {
|
||||
}
|
||||
|
||||
run = Model.GetNextRun(index);
|
||||
var cellToText = new ConvertCellToText(Model, run.Start);
|
||||
var cell = currentView[point.X, point.Y];
|
||||
|
||||
if (run is PCSRun pcs) {
|
||||
if (run is PCSRun || run is AsciiRun) {
|
||||
for (int i = index; i < run.Start + run.Length; i++) history.CurrentChange.ChangeData(Model, i, 0xFF);
|
||||
var length = PCSString.ReadString(Model, run.Start, true);
|
||||
Model.ObserveRunWritten(history.CurrentChange, new PCSRun(Model, run.Start, length, run.PointerSources));
|
||||
if (run is PCSRun) Model.ObserveRunWritten(history.CurrentChange, new PCSRun(Model, run.Start, length, run.PointerSources));
|
||||
RefreshBackingData();
|
||||
SelectionStart = scroll.DataIndexToViewPoint(index - 1);
|
||||
return;
|
||||
}
|
||||
|
||||
var cellToText = new ConvertCellToText(Model, run.Start);
|
||||
var cell = currentView[point.X, point.Y];
|
||||
|
||||
if (run is ArrayRun array) {
|
||||
var offsets = array.ConvertByteOffsetToArrayOffset(index);
|
||||
if (array.ElementContent[offsets.SegmentIndex].Type == ElementContentType.PCS) {
|
||||
|
||||
@@ -105,7 +105,7 @@ namespace HavenSoft.HexManiac.Core.ViewModels.Visitors {
|
||||
|
||||
public void Visit(ErrorPCS pcs, byte data) => Visit((PCS)null, data);
|
||||
|
||||
public void Visit(Ascii ascii, byte data) { }
|
||||
public void Visit(Ascii ascii, byte data) => Results.AddRange(GetFormattedChildren());
|
||||
|
||||
public void Visit(Integer integer, byte data) {
|
||||
var arrayRun = (ArrayRun)ViewPort.Model.GetNextRun(ViewPort.Tools.TableTool.Address);
|
||||
|
||||
Reference in New Issue
Block a user