File tree Expand file tree Collapse file tree 1 file changed +17
-6
lines changed
Expand file tree Collapse file tree 1 file changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,11 @@ use rand::prelude::*;
77use std:: sync:: Arc ;
88use std:: sync:: atomic:: { AtomicBool , Ordering } ;
99use std:: time:: Duration ;
10- use std:: { thread, fs, io:: { self , Write } } ;
10+ use std:: {
11+ fs,
12+ io:: { self , Write } ,
13+ thread,
14+ } ;
1115use term_size;
1216use textwrap:: wrap;
1317use unicode_width:: UnicodeWidthStr ;
@@ -460,7 +464,8 @@ pub fn render(runtime: &RuntimeConfig, cli: &crate::cli::Cli) {
460464 // Handle Ctrl+C gracefully
461465 ctrlc:: set_handler ( move || {
462466 r. store ( false , Ordering :: SeqCst ) ;
463- } ) . expect ( "Error setting Ctrl-C handler" ) ;
467+ } )
468+ . expect ( "Error setting Ctrl-C handler" ) ;
464469
465470 // Hide cursor
466471 print ! ( "\x1B [?25l" ) ;
@@ -476,19 +481,25 @@ pub fn render(runtime: &RuntimeConfig, cli: &crate::cli::Cli) {
476481 let mut vertical = 0 ;
477482 let mut horizontal = 0 ;
478483
479- if runtime. border {
484+ if runtime. border {
480485 vertical = runtime. vertical_padding ;
481486 horizontal = runtime. horizontal_padding ;
482487 }
483488
484489 // estimate how many lines the box will take (content + borders + padding)
485490 let content_lines = {
486491 let mut count = jap_lines. len ( ) ;
487- if show_translation { count += 1 ; }
488- if show_source { count += 1 ; }
492+ if show_translation {
493+ count += 1 ;
494+ }
495+ if show_source {
496+ count += 1 ;
497+ }
489498 // Add vertical padding and border lines
490499 count += vertical * 2 ;
491- if runtime. border { count += 2 ; }
500+ if runtime. border {
501+ count += 2 ;
502+ }
492503 count
493504 } ;
494505
You can’t perform that action at this time.
0 commit comments