mirror of
https://github.com/alacritty/alacritty.git
synced 2024-11-18 13:55:23 -05:00
Revert "Fix cursor not showing in first column"
This reverts commit 54b21b66ec
.
This commit is contained in:
parent
0d900cdf69
commit
4df09128ce
1 changed files with 4 additions and 8 deletions
|
@ -745,16 +745,15 @@ impl<'a, T: Copy + 'a> Iterator for DisplayIter<'a, T> {
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
fn next(&mut self) -> Option<Self::Item> {
|
fn next(&mut self) -> Option<Self::Item> {
|
||||||
// Check if the end of the line was reached
|
// Make sure indices are valid. Return None if we've reached the end.
|
||||||
let next_line = self.col == self.grid.num_cols();
|
if self.col == self.grid.num_cols() {
|
||||||
if next_line {
|
|
||||||
// Return `None` if we've reached the end of the last line
|
|
||||||
if self.offset == self.limit {
|
if self.offset == self.limit {
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Switch to the next line
|
// Switch to the next line
|
||||||
self.col = Column(0);
|
self.col = Column(0);
|
||||||
|
|
||||||
self.offset -= 1;
|
self.offset -= 1;
|
||||||
self.line = Line(*self.grid.lines - 1 - (self.offset - self.limit));
|
self.line = Line(*self.grid.lines - 1 - (self.offset - self.limit));
|
||||||
}
|
}
|
||||||
|
@ -766,10 +765,7 @@ impl<'a, T: Copy + 'a> Iterator for DisplayIter<'a, T> {
|
||||||
column: self.col
|
column: self.col
|
||||||
});
|
});
|
||||||
|
|
||||||
// Only increment column if the line hasn't changed
|
|
||||||
if !next_line {
|
|
||||||
self.col += 1;
|
self.col += 1;
|
||||||
}
|
|
||||||
item
|
item
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue