diff options
author | Kirill Chibisov <contact@kchibisov.com> | 2020-06-26 19:04:55 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-26 16:04:55 +0000 |
commit | 8a39346b753528091ccd0c933a216db7f27a7321 (patch) | |
tree | 82fbbabf69511670c89de9e6702bf9caac730edc /alacritty_terminal/src/grid | |
parent | 6c8966f426552065f2846c0c1f555d02aba98141 (diff) | |
download | alacritty-8a39346b753528091ccd0c933a216db7f27a7321.tar.gz alacritty-8a39346b753528091ccd0c933a216db7f27a7321.zip |
Clear selection on clear line/screen escapes
Selection is now cleared if clear line or clear screen escape sequences
are clearing content behind it.
Diffstat (limited to 'alacritty_terminal/src/grid')
-rw-r--r-- | alacritty_terminal/src/grid/mod.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/alacritty_terminal/src/grid/mod.rs b/alacritty_terminal/src/grid/mod.rs index 5178ed99..fd555d1b 100644 --- a/alacritty_terminal/src/grid/mod.rs +++ b/alacritty_terminal/src/grid/mod.rs @@ -187,6 +187,11 @@ impl<T: GridCell + Default + PartialEq + Copy> Grid<T> { Point { line: self.lines.0 + self.display_offset - point.line.0 - 1, col: point.col } } + /// Return the cursor position in buffer coordinates. + pub fn cursor_buffer_point(&self) -> Point<usize> { + Point { line: self.lines.0 - self.cursor.point.line.0 - 1, col: self.cursor.point.col } + } + /// Update the size of the scrollback history. pub fn update_history(&mut self, history_size: usize) { let current_history_size = self.history_size(); |