Put the wiped entry boxes back on Alt+W
N1MM wipes on Ctrl+W and puts the boxes back on Alt+W, which this had no key for. A wipe now keeps the call, the exchange, the name, the comment and the sent time, and Alt+W fills them in again. Wiping empty boxes keeps what the wipe before it held, and the boxes are only filled in again when they are empty, so nothing typed since the wipe is thrown away. A call moved onto the call stack is not kept: it has not gone anywhere and putting it back would make a second copy of it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015NZkFxHde1iifAQemFTHxf
This commit is contained in:
@@ -648,4 +648,67 @@ public class OperatingPositionTests
|
||||
[Fact]
|
||||
public void EmptyBoxesGiveNoProblem() =>
|
||||
Assert.Null(Session().EntryProblem());
|
||||
|
||||
/// N1MM's Alt+W: a wipe keeps what was in the boxes and Alt+W puts it back.
|
||||
[Fact]
|
||||
public void WhatAWipeClearedComesBack()
|
||||
{
|
||||
OperatingPosition session = Session();
|
||||
Type(session, "JA1XYZ", "25");
|
||||
session.Comment = "loud";
|
||||
|
||||
session.Wipe();
|
||||
Assert.Equal("", session.Entry.Call);
|
||||
|
||||
Assert.True(session.RestoreWiped());
|
||||
Assert.Equal("JA1XYZ", session.Entry.Call);
|
||||
Assert.Equal("25", session.Entry.ValueOf(ExchangeSlot.Zone));
|
||||
Assert.Equal("loud", session.Comment);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ThereIsNothingToPutBackBeforeAWipe() =>
|
||||
Assert.False(Session().RestoreWiped());
|
||||
|
||||
/// Wiping empty boxes would otherwise throw away what the wipe before it
|
||||
/// kept.
|
||||
[Fact]
|
||||
public void ASecondWipeKeepsTheFirstOne()
|
||||
{
|
||||
OperatingPosition session = Session();
|
||||
Type(session, "JA1XYZ", "25");
|
||||
|
||||
session.Wipe();
|
||||
session.Wipe();
|
||||
|
||||
Assert.True(session.RestoreWiped());
|
||||
Assert.Equal("JA1XYZ", session.Entry.Call);
|
||||
}
|
||||
|
||||
/// N1MM puts the boxes back only when they are empty, so typing is never
|
||||
/// overwritten by a restore.
|
||||
[Fact]
|
||||
public void NothingIsPutBackOverSomethingTyped()
|
||||
{
|
||||
OperatingPosition session = Session();
|
||||
Type(session, "JA1XYZ", "25");
|
||||
session.Wipe();
|
||||
session.Entry.Call = "DL2XYZ";
|
||||
|
||||
Assert.False(session.RestoreWiped());
|
||||
Assert.Equal("DL2XYZ", session.Entry.Call);
|
||||
}
|
||||
|
||||
/// A call put on the stack has not gone anywhere, so there is nothing to
|
||||
/// put back and Alt+W would only make a second copy of it.
|
||||
[Fact]
|
||||
public void AStackedCallIsNotWaitingToBePutBack()
|
||||
{
|
||||
OperatingPosition session = Session();
|
||||
session.IsRunning = true;
|
||||
Type(session, "JA1XYZ", "25");
|
||||
|
||||
Assert.True(session.StackAnother());
|
||||
Assert.False(session.RestoreWiped());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user