~eliasnaur/gio

a2523943563c66a36faf3fa2be8574f86fc619fa — Elias Naur 3 months ago e3ef98d
widget: update Editor.Delete documentation to refer to graphemes

Signed-off-by: Elias Naur <mail@eliasnaur.com>
1 files changed, 3 insertions(+), 2 deletions(-)

M widget/editor.go
M widget/editor.go => widget/editor.go +3 -2
@@ 739,10 739,11 @@ func (e *Editor) CaretCoords() f32.Point {
	return e.text.CaretCoords()
}

// Delete runes from the caret position. The sign of runes specifies the
// Delete runes from the caret position. The sign of the argument specifies the
// direction to delete: positive is forward, negative is backward.
//
// If there is a selection, it is deleted and counts as a single rune.
// If there is a selection, it is deleted and counts as a single grapheme
// cluster.
func (e *Editor) Delete(graphemeClusters int) {
	e.initBuffer()
	if graphemeClusters == 0 {