mirror of https://github.com/bobwen-dev/hunter
count lines in TextView from 1
This commit is contained in:
parent
34ee65600f
commit
44baece00f
|
@ -204,11 +204,9 @@ impl Widget for TextView {
|
|||
fn render_footer(&self) -> HResult<String> {
|
||||
let (xsize, ysize) = self.core.coordinates.size_u();
|
||||
let (_, ypos) = self.core.coordinates.position_u();
|
||||
let lines = self.lines
|
||||
.len()
|
||||
.saturating_sub(1);
|
||||
let current_line_top = self.offset;
|
||||
let current_line_bot = std::cmp::min(current_line_top + ysize + 1,
|
||||
let lines = self.lines.len();
|
||||
let current_line_top = self.offset + 1;
|
||||
let current_line_bot = std::cmp::min(current_line_top + (ysize + 1),
|
||||
lines);
|
||||
let line_hint = format!("{} - {} / {}",
|
||||
current_line_top,
|
||||
|
|
Loading…
Reference in New Issue