--predict-overwrite was still inserting one column sometimes. Fix.

This commit is contained in:
John Hood
2017-08-02 21:38:32 -04:00
parent 8aac3cc927
commit c49c67cecf
+1 -1
View File
@@ -759,7 +759,7 @@ void PredictionEngine::new_user_byte( char the_byte, const Framebuffer &fb )
} }
/* do the insert */ /* do the insert */
int rightmost_column = predict_overwrite ? cursor().col + 1 : fb.ds.get_width() - 1; int rightmost_column = predict_overwrite ? cursor().col : fb.ds.get_width() - 1;
for ( int i = rightmost_column; i > cursor().col; i-- ) { for ( int i = rightmost_column; i > cursor().col; i-- ) {
ConditionalOverlayCell &cell = the_row.overlay_cells[ i ]; ConditionalOverlayCell &cell = the_row.overlay_cells[ i ];
cell.reset_with_orig(); cell.reset_with_orig();