fix bug of undo/redo creating new change operations themselves
This commit is contained in:
1 parent
3e50e8a3b3
commit
4e03fbc3de
3 files changed
+29
-10
No files matched your search
@@ -195,6 +195,10 @@ TEST(BufferTest, allows_undo_and_redo_of_inserts)
|
||||
b.redo();
|
||||
EXPECT_EQ(ss("12abc\nd3ef$\nghi\n"), b.get_string());
|
||||
EXPECT_EQ(C('d'), **it);
|
||||
|
||||
/* undo/redo do not create new operations */
|
||||
EXPECT_FALSE(b.m_current_change_operation);
|
||||
EXPECT_EQ(3u, b.m_change_operations.size());
|
||||
}
|
||||
|
||||
TEST(BufferTest, allows_undo_and_redo_of_erases)
|
||||
@@ -247,6 +251,10 @@ TEST(BufferTest, allows_undo_and_redo_of_erases)
|
||||
b.redo();
|
||||
EXPECT_EQ(ss("bc\ndfghi\n"), b.get_string());
|
||||
EXPECT_EQ(C('f'), **it);
|
||||
|
||||
/* undo/redo do not create new operations */
|
||||
EXPECT_FALSE(b.m_current_change_operation);
|
||||
EXPECT_EQ(3u, b.m_change_operations.size());
|
||||
}
|
||||
|
||||
TEST(BufferTest, erase_chunks_are_coalesced_within_a_change_operation)
|
||||
|
||||
Reference in new issue
Block a user