public static void Delete(HexEditorData data) { if (data.IsSomethingSelected) { data.DeleteSelection(); return; } if (data.Caret.Offset >= data.Length) { return; } data.Remove(data.Caret.Offset, 1); data.UpdateLine(data.Caret.Line); }
public static void Backspace(HexEditorData data) { if (data.IsSomethingSelected) { data.DeleteSelection(); return; } if (data.Caret.Offset == 0) { return; } data.Remove(data.Caret.Offset - 1, 1); data.Caret.Offset--; }