Commit graph

5 commits

Author SHA1 Message Date
Héctor Ramón Jiménez
a07a619054 Add set_hinting method to Buffer 2025-12-01 13:59:55 -07:00
Héctor Ramón Jiménez
d779057d9c Replace magic boolean with new Hinting enum 2025-12-01 13:59:55 -07:00
Héctor Ramón Jiménez
48eda6bd7d Draft metrics hinting support 2025-12-01 13:59:55 -07:00
Jeremy Soller
5cc64c77c1
Better handling of newlines in editor insert and delete 2025-10-09 12:21:38 -06:00
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