mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-29 21:34:50 +00:00
![]() Olivier found the following steps that reproduce the crash with Skia: 1. Open the gallery and select the "Text Edit" tab. 2. In the first text edit widget, select the first three letters. 3. Click into the second text edit (while the first one shows the selected text) 4. At the beginning of the text, insert the letter "ù" a few times. This sequence would result in the cursor_position property get out of sync. Since it represents a byte offset in the utf-8 text, it would point straight into a utf-8 sequence, resulting in a panic when the renderer would try to create a slice of the selected text. As a remedy, this patch renames the cursor_position and anchor_position properties and provides wrapper getter accessors for use within the TextInput to safely bound the stored offset. Eventually we need to intercept changes to the text property and adjust the cursor and anchor position properties accordingly, so that they remain valid. However this requires that the compiler is aware that a property is not accessible directly but has a setter that needs to be called instead. This likely/hopefully also fixes #1707. |
||
---|---|---|
.. | ||
generator | ||
LICENSES | ||
llr | ||
parser | ||
parser-test-macro | ||
passes | ||
tests | ||
widgets | ||
build.rs | ||
builtin_macros.rs | ||
builtins.slint | ||
Cargo.toml | ||
diagnostics.rs | ||
embedded_resources.rs | ||
expression_tree.rs | ||
fileaccess.rs | ||
generator.rs | ||
langtype.rs | ||
layout.rs | ||
lexer.rs | ||
lib.rs | ||
literals.rs | ||
llr.rs | ||
load_builtins.rs | ||
lookup.rs | ||
namedreference.rs | ||
object_tree.rs | ||
parser.rs | ||
passes.rs | ||
README.md | ||
typeloader.rs | ||
typeregister.rs |
The Slint Compiler Library
NOTE: This library is an internal crate of the Slint project.
This crate should not be used directly by applications using Slint.
You should use the slint
crate instead.
WARNING: This crate does not follow the semver convention for versioning and can
only be used with version = "=x.y.z"
in Cargo.toml.