Moves the viewport so that the end of the line is visible.
(&mut self)
| 81 | |
| 82 | /// Moves the viewport so that the end of the line is visible. |
| 83 | fn reset_view_to_end(&mut self) { |
| 84 | self.view_start = |
| 85 | if self.input_width == 0 { 0 } else { self.pos.saturating_sub(self.input_width) }; |
| 86 | self.sync_rendered(); |
| 87 | } |
| 88 | |
| 89 | /// Redraws the rendered viewport and places the cursor at the desired offset. |
| 90 | fn redraw_line(&mut self, old_pos: usize, clear_len: usize, new_pos: usize) -> io::Result<()> { |
no test coverage detected