From 22ad5373c5e4e4c68b4a9f8fcde83caee92237a2 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Wed, 13 Jul 2022 08:38:07 -0700 Subject: a bug I've never run into The previous commit was failing inside a test that I can't reproduce manually. Perhaps it's something about how often draw/update run in practice. Anyways, it's definitely uncovered a real issue. --- drawing_tests.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drawing_tests.lua') diff --git a/drawing_tests.lua b/drawing_tests.lua index 96e4bd8..38a0144 100644 --- a/drawing_tests.lua +++ b/drawing_tests.lua @@ -643,6 +643,7 @@ function test_undo_name_point() check_eq(p2.y, 36, 'F - test_undo_name_point/baseline/p2:y') check_nil(p2.name, 'F - test_undo_name_point/baseline/p2:name') check_eq(#Editor_state.history, 1, 'F - test_undo_name_point/baseline/history:1') +--? print('a', Editor_state.lines.current_drawing) -- enter 'name' mode without moving the mouse edit.run_after_keychord(Editor_state, 'C-n') edit.run_after_textinput(Editor_state, 'A') @@ -650,6 +651,7 @@ function test_undo_name_point() check_eq(p2.name, 'A', 'F - test_undo_name_point/baseline') check_eq(#Editor_state.history, 3, 'F - test_undo_name_point/baseline/history:2') check_eq(Editor_state.next_history, 4, 'F - test_undo_name_point/baseline/next_history') +--? print('b', Editor_state.lines.current_drawing) -- undo edit.run_after_keychord(Editor_state, 'C-z') local drawing = Editor_state.lines[1] -- cgit 1.4.1-2-gfad0