Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/fs_service/io/read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ impl FileSystemService {
let start_pos = if line_count <= n {
0 // Read from start if fewer than n lines
} else {
*newline_positions.get(line_count - n).unwrap_or(&0) + 1
*newline_positions.get(n).unwrap_or(&0) + 1
};

// Read forward from start_pos
Expand Down
2 changes: 1 addition & 1 deletion src/tools/tail_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use crate::fs_service::FileSystemService;
pub struct TailFile {
/// The path of the file to get information for.
pub path: String,
/// The number of lines to read from the beginning of the file.
/// The number of lines to read from the ending of the file.
pub lines: u64,
}

Expand Down