cosmic-text/tests
Joshua Megnauth ff5501d9a3
Fix: Undo and redo correctly updates editor modified status (#244)
* Set an index for the last saved change

I added an index that represents the last saved change.

Editors are considered to be unsaved or modified if the current change
is different from the save index. In other words, if the last saved
change is `5`, undoing or redoing past that change should indicate that
the editor has been modified.

This is needed to fix two bugs in COSMIC Edit:
* https://github.com/pop-os/cosmic-edit/issues/116
* https://github.com/pop-os/cosmic-edit/issues/128

* Unit test that confirms pivot logic works

I'll most likely simplify the API as end users don't have a way to
cleanly use `Pivot::Exact` without access to the internal command
buffer.

* Simplify save point API

* Implement more save point unit tests

A unit test for an edge case currently fails but normal usage works.

* Fix edge case for empty command index and pivot

* More save point unit tests for common use cases
2024-03-25 08:55:44 -06:00
..
common Refactor of scroll and shaping 2024-01-17 13:31:03 -07:00
images Update test image size 2024-02-02 10:50:17 -07:00
editor_modified_state.rs Fix: Undo and redo correctly updates editor modified status (#244) 2024-03-25 08:55:44 -06:00
shaping_and_rendering.rs Update test image size 2024-02-02 10:50:17 -07:00
wrap_stability.rs Add a test case for extra line insertion. 2024-02-02 12:53:48 -07:00
wrap_word_fallback.rs Adds a separate wrapping option to allow word to glyph fallback. 2024-02-02 10:40:30 -07:00