Move cursor to start of line.
(&mut self, shift: bool)
| 231 | |
| 232 | /// Move cursor to start of line. |
| 233 | pub fn move_home(&mut self, shift: bool) { |
| 234 | if shift && self.selection_anchor.is_none() { |
| 235 | self.selection_anchor = Some(self.cursor_pos); |
| 236 | } |
| 237 | self.cursor_pos = 0; |
| 238 | if !shift { |
| 239 | self.selection_anchor = None; |
| 240 | } else if self.selection_anchor == Some(0) { |
| 241 | self.selection_anchor = None; |
| 242 | } |
| 243 | self.reset_blink(); |
| 244 | } |
| 245 | |
| 246 | /// Move cursor to end of line. |
| 247 | pub fn move_end(&mut self, shift: bool) { |
no test coverage detected