@@ -67,7 +67,7 @@ pub fn edit(
6767 at = cut.1
6868 other = at
6969 }
70- if input.key_pressed(Backspace ) {
70+ if input.key_pressed(@input. Key :: Backspace ) {
7171 if at != other {
7272 let cut = replace(out, at, other, "")
7373 out = cut.0
@@ -79,7 +79,7 @@ pub fn edit(
7979 }
8080 other = at
8181 }
82- if input.key_pressed(Delete ) {
82+ if input.key_pressed(@input. Key :: Delete ) {
8383 if at != other {
8484 let cut = replace(out, at, other, "")
8585 out = cut.0
@@ -89,7 +89,7 @@ pub fn edit(
8989 }
9090 other = at
9191 }
92- match input.key_down(Left ) {
92+ match input.key_down(@input. Key :: Left ) {
9393 Some (mods) => {
9494 at = if at != other && !mods.shift {
9595 smaller(at, other)
@@ -102,7 +102,7 @@ pub fn edit(
102102 }
103103 None => ()
104104 }
105- match input.key_down(Right ) {
105+ match input.key_down(@input. Key :: Right ) {
106106 Some (mods) => {
107107 at = if at != other && !mods.shift {
108108 larger(at, other)
@@ -115,7 +115,7 @@ pub fn edit(
115115 }
116116 None => ()
117117 }
118- match input.key_down(Home ) {
118+ match input.key_down(@input. Key :: Home ) {
119119 Some (mods) => {
120120 at = 0
121121 if !mods.shift {
@@ -124,7 +124,7 @@ pub fn edit(
124124 }
125125 None => ()
126126 }
127- match input.key_down(End ) {
127+ match input.key_down(@input. Key :: End ) {
128128 Some (mods) => {
129129 at = out.length()
130130 if !mods.shift {
@@ -137,7 +137,7 @@ pub fn edit(
137137 }
138138 at = clamp_to(at, out.length())
139139 other = clamp_to(other, out.length())
140- memory.set(id, Cursor (at~, other~))
140+ memory.set(id, @mem. State :: Cursor (at~, other~))
141141 if out != value {
142142 response.mark_changed()
143143 }
0 commit comments