More fixes. Still have nondeterministic emacs bug.

This commit is contained in:
Keith Winstein
2011-12-15 11:46:49 -05:00
parent 808e2562f6
commit 7251279f55
+16 -5
View File
@@ -60,6 +60,10 @@ Validity ConditionalOverlayCell::get_validity( const Framebuffer &fb, int row, u
return Correct; return Correct;
} }
if ( replacement.contents.empty() && current.contents.empty() ) {
return Correct;
}
if ( current == replacement ) { if ( current == replacement ) {
return Correct; return Correct;
} else { } else {
@@ -289,6 +293,9 @@ void PredictionEngine::cull( const Framebuffer &fb )
become_tentative(); become_tentative();
return; return;
break; break;
case Correct:
cursor.thaw();
break;
default: default:
break; break;
} }
@@ -324,10 +331,8 @@ void PredictionEngine::cull( const Framebuffer &fb )
if ( j->display_time != uint64_t(-1) ) { if ( j->display_time != uint64_t(-1) ) {
fprintf( stderr, "TIMING %ld - %ld\n", time(NULL), now - j->display_time ); fprintf( stderr, "TIMING %ld - %ld\n", time(NULL), now - j->display_time );
} }
j->reset(); reset();
become_tentative(); return;
cursor.reset();
/* should reset and return here */
} }
break; break;
case Correct: case Correct:
@@ -335,10 +340,12 @@ void PredictionEngine::cull( const Framebuffer &fb )
fprintf( stderr, "TIMING %ld + %ld\n", now, now - j->display_time ); fprintf( stderr, "TIMING %ld + %ld\n", now, now - j->display_time );
} }
j->reset();
if ( j->prediction_time > prediction_checkpoint ) { if ( j->prediction_time > prediction_checkpoint ) {
score++; score++;
} }
j->reset();
break; break;
case Pending: case Pending:
max_delay = max( max_delay, now - j->prediction_time ); max_delay = max( max_delay, now - j->prediction_time );
@@ -492,6 +499,10 @@ void PredictionEngine::new_user_byte( char the_byte, const Framebuffer &fb )
become_tentative(); become_tentative();
cursor.freeze(); cursor.freeze();
fprintf( stderr, "Execute 0x%x\n", act->ch ); fprintf( stderr, "Execute 0x%x\n", act->ch );
} else if ( typeid( *act ) == typeid( Parser::Esc_Dispatch ) ) {
fprintf( stderr, "Escape sequence\n" );
} else if ( typeid( *act ) == typeid( Parser::CSI_Dispatch ) ) {
fprintf( stderr, "CSI sequence\n" );
} }
delete act; delete act;