Give credit to deletion at end of line per Bill (fixes #10 github issue)
This commit is contained in:
@@ -94,14 +94,11 @@ Validity ConditionalOverlayCell::get_validity( const Framebuffer &fb, int row,
|
|||||||
|
|
||||||
if ( (late_ack >= expiration_frame)
|
if ( (late_ack >= expiration_frame)
|
||||||
|| ( (sent_frame <= early_ack) && (expiration_time <= now) ) ) {
|
|| ( (sent_frame <= early_ack) && (expiration_time <= now) ) ) {
|
||||||
/* special case deletion */
|
if ( (current.contents == replacement.contents)
|
||||||
if ( current.is_blank() && replacement.is_blank() ) {
|
|| (current.is_blank() && replacement.is_blank()) ) {
|
||||||
return CorrectNoCredit;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( current.contents == replacement.contents ) {
|
|
||||||
auto it = find_if( original_contents.begin(), original_contents.end(),
|
auto it = find_if( original_contents.begin(), original_contents.end(),
|
||||||
[&]( const Cell &x ) { return replacement.contents == x.contents; } );
|
[&]( const Cell &x ) { return ( (replacement.is_blank() && x.is_blank())
|
||||||
|
|| (replacement.contents == x.contents) ); } );
|
||||||
if ( it == original_contents.end() ) {
|
if ( it == original_contents.end() ) {
|
||||||
return Correct;
|
return Correct;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user