a commit that exhibits the string bug

This commit is contained in:
bunnie 2021-03-11 22:33:57 +08:00
parent d2ef03b7e2
commit 307df04e8b

View file

@ -46,9 +46,6 @@ const TEXTVIEW_LEN: usize = 3072;
#[derive(Copy, Clone, rkyv::Archive, rkyv::Unarchive)]
pub struct TextView {
canvas: Gid, // GID of the canvas to draw on
pub clip_rect: Option<Rectangle>, // this is set by the GAM to the canvas' clip_rect; needed by gfx for drawing. Note this is in screen coordinates.
// this is the operation as specified for the GAM. Note this is different from the "op" when sent to graphics-server
// only the GAM should be sending TextViews to the graphics-server, and a different coding scheme is used for that link.
operation: TextOp,
@ -65,6 +62,7 @@ pub struct TextView {
pub dry_run: bool, // set to true if no drawing is desired and we just want to compute the bounds
pub style: GlyphStyle,
pub text: xous::String::<3072>,
pub cursor: Cursor,
pub insertion: Option<i32>, // this is the insertion point offset, if it's to be drawn, on the string
pub ellipsis: bool,
@ -78,7 +76,8 @@ pub struct TextView {
// this field specifies the beginning and end of a "selected" region of text
pub selected: Option<[u32; 2]>,
pub text: xous::String::<3072>,
canvas: Gid, // GID of the canvas to draw on
pub clip_rect: Option<Rectangle>, // this is set by the GAM to the canvas' clip_rect; needed by gfx for drawing. Note this is in screen coordinates.
}
impl TextView {
pub fn new(canvas: Gid, bounds_hint: TextBounds) -> Self {