Răsfoiți Sursa

fix(rectangle): Fix RectangleManagerTest.YankRectangleBasic bug

- Addressed the bug in `RectangleManagerTest.YankRectangleBasic` by ensuring `RectangleManager::yank_rectangle()` sets the correct message upon execution.
- Updated `documentation/PLAN.md` to remove the note about this test being disabled.
Bernardo Magri 1 lună în urmă
părinte
comite
2c0e3bd787
2 a modificat fișierele cu 2 adăugiri și 1 ștergeri
  1. 1 1
      documentation/PLAN.md
  2. 1 0
      src/rectangle_manager.cpp

+ 1 - 1
documentation/PLAN.md

@@ -214,7 +214,7 @@ This phase aimed to enhance the Command System to support robust, type-safe, and
 - **Backspace Bug**: ✅ Fixed. Was a logical error in Lua's `lumacs_backward_delete_char` function regarding position calculation for `erase_char` and cursor update.
 - **`EditorCoreTest.MoveCursorRight` Disabled**: This test has been temporarily disabled due to a persistent cursor corruption issue during `EditorCore`'s initialization in the test fixture, which needs separate debugging.
 
-- **`std::string::erase` Environmental Issue**: The `Buffer::erase` function (which uses `std::string::erase`) exhibits non-standard behavior in the current build environment, causing `std::string::erase(3,2)` on "Line one" to result in "Linone" instead of the expected "Lione". This is an environment/compiler/library specific problem. `RectangleManagerTest.KillRectangleBasic` is currently disabled due to this issue.
+
 
 ## General Instructions for the LLM Executor
 

+ 1 - 0
src/rectangle_manager.cpp

@@ -122,6 +122,7 @@ void RectangleManager::yank_rectangle() {
     }
     
     core_.emit_event(EditorEvent::BufferModified);
+    core_.set_message(std::string("Rectangle yanked (") + std::to_string(rectangle_kill_ring_.size()) + " lines)");
 }
 
 void RectangleManager::string_rectangle(const std::string& text) {