MCPcopy Create free account
hub / github.com/LibertyOS-Development/kernel / csi_dispatch

Method csi_dispatch

src/sys/prompt.rs:171–201  ·  view source on GitHub ↗

CSI dispatcher

(&mut self, params: &Params, _inter: &[u8], _ignore: bool, c: char)

Source from the content-addressed store, hash-verified

169{
170 // CSI dispatcher
171 fn csi_dispatch(&mut self, params: &Params, _inter: &[u8], _ignore: bool, c: char)
172 {
173 match c
174 {
175 // Up
176 'A' => self.handle_up(),
177
178 // Down
179 'B' => self.handle_down(),
180
181 // Forward
182 'C' => self.handle_forward(),
183
184 // Backward
185 'D' => self.handle_backward(),
186
187 '~' =>
188 {
189 for param in params.iter()
190 {
191 // Delete
192 if param[0] == 3
193 {
194 self.handle_del();
195 }
196 }
197 },
198
199 _ => {},
200 }
201 }
202
203
204 // Execute

Callers

nothing calls this directly

Calls 5

handle_upMethod · 0.80
handle_downMethod · 0.80
handle_forwardMethod · 0.80
handle_backwardMethod · 0.80
handle_delMethod · 0.80

Tested by

no test coverage detected