Rename some variables for clarity

This commit is contained in:
Joe Wilm 2017-08-09 13:24:42 -05:00 committed by Joe Wilm
parent dd7eb92d68
commit 6de7ee0c51
1 changed files with 4 additions and 4 deletions

View File

@ -1557,25 +1557,25 @@ impl ansi::Handler for Term {
#[inline] #[inline]
fn save_cursor_position(&mut self) { fn save_cursor_position(&mut self) {
trace!("CursorSave"); trace!("CursorSave");
let mut holder = if self.alt { let mut cursor = if self.alt {
&mut self.cursor_save_alt &mut self.cursor_save_alt
} else { } else {
&mut self.cursor_save &mut self.cursor_save
}; };
*holder = self.cursor; *cursor = self.cursor;
} }
#[inline] #[inline]
fn restore_cursor_position(&mut self) { fn restore_cursor_position(&mut self) {
trace!("CursorRestore"); trace!("CursorRestore");
let holder = if self.alt { let source = if self.alt {
&self.cursor_save_alt &self.cursor_save_alt
} else { } else {
&self.cursor_save &self.cursor_save
}; };
self.cursor = *holder; self.cursor = *source;
self.cursor.point.line = min(self.cursor.point.line, self.grid.num_lines() - 1); self.cursor.point.line = min(self.cursor.point.line, self.grid.num_lines() - 1);
self.cursor.point.col = min(self.cursor.point.col, self.grid.num_cols() - 1); self.cursor.point.col = min(self.cursor.point.col, self.grid.num_cols() - 1);
} }