diff --git a/src/pr/pr.rs b/src/pr/pr.rs index e54a3b11f..a9bb0ce60 100644 --- a/src/pr/pr.rs +++ b/src/pr/pr.rs @@ -44,6 +44,7 @@ struct OutputOptions { /// Line numbering mode number: Option, header: String, + double_space: bool, line_separator: String, last_modified_time: String, start_page: Option, @@ -253,12 +254,16 @@ fn build_options(matches: &Matches, header: &String, path: &String) -> Result Result Result { let mut i = 0; let mut page: usize = 0; let mut buffered_content: Vec = Vec::new(); - + let lines_per_page = if options.as_ref().double_space { + CONTENT_LINES_PER_PAGE / 2 + } else { + CONTENT_LINES_PER_PAGE + }; for line in BufReader::with_capacity(READ_BUFFER_SIZE, open(path)?).lines() { - if i == CONTENT_LINES_PER_PAGE { + if i == lines_per_page { page = page + 1; i = 0; print_page(&buffered_content, options, &page)?;