Fix propagation of "unknown" last column on emacs and emacs-like delete

This commit is contained in:
Keith Winstein
2012-02-25 23:08:56 -05:00
parent dd80fb7bc7
commit afacda98e4
+9 -14
View File
@@ -63,7 +63,8 @@ void ConditionalOverlayCell::apply( Framebuffer &fb, uint64_t confirmed_epoch, i
} }
Validity ConditionalOverlayCell::get_validity( const Framebuffer &fb, int row, Validity ConditionalOverlayCell::get_validity( const Framebuffer &fb, int row,
uint64_t early_ack, uint64_t late_ack ) const uint64_t early_ack __attribute__((unused)),
uint64_t late_ack ) const
{ {
if ( !active ) { if ( !active ) {
return Inactive; return Inactive;
@@ -74,18 +75,14 @@ Validity ConditionalOverlayCell::get_validity( const Framebuffer &fb, int row,
return IncorrectOrExpired; return IncorrectOrExpired;
} }
if ( unknown ) {
return CorrectNoCredit;
}
const Cell &current = *( fb.get_cell( row, col ) ); const Cell &current = *( fb.get_cell( row, col ) );
/* see if it hasn't been updated yet */ /* see if it hasn't been updated yet */
if ( early_ack < expiration_frame ) {
return Pending;
}
if ( late_ack >= expiration_frame ) { if ( late_ack >= expiration_frame ) {
if ( unknown ) {
return CorrectNoCredit;
}
if ( (current.contents == replacement.contents) if ( (current.contents == replacement.contents)
|| (current.is_blank() && replacement.is_blank()) ) { || (current.is_blank() && replacement.is_blank()) ) {
BOOST_AUTO( it, find_if( original_contents.begin(), original_contents.end(), BOOST_AUTO( it, find_if( original_contents.begin(), original_contents.end(),
@@ -104,7 +101,9 @@ Validity ConditionalOverlayCell::get_validity( const Framebuffer &fb, int row,
return Pending; return Pending;
} }
Validity ConditionalCursorMove::get_validity( const Framebuffer &fb, uint64_t early_ack, uint64_t late_ack ) const Validity ConditionalCursorMove::get_validity( const Framebuffer &fb,
uint64_t early_ack __attribute((unused)),
uint64_t late_ack ) const
{ {
if ( !active ) { if ( !active ) {
return Inactive; return Inactive;
@@ -117,10 +116,6 @@ Validity ConditionalCursorMove::get_validity( const Framebuffer &fb, uint64_t ea
return IncorrectOrExpired; return IncorrectOrExpired;
} }
if ( early_ack < expiration_frame ) {
return Pending;
}
if ( late_ack >= expiration_frame ) { if ( late_ack >= expiration_frame ) {
if ( (fb.ds.get_cursor_col() == col) if ( (fb.ds.get_cursor_col() == col)
&& (fb.ds.get_cursor_row() == row) ) { && (fb.ds.get_cursor_row() == row) ) {