Skip to content

Commit b051fc2

Browse files
committed
Fixes #60
1 parent 924a4fb commit b051fc2

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/main.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,13 @@ fn run_app(app: &Application, initial_path: &Option<PathBuf>) {
505505
let log_window = show_log_window(
506506
status.path.clone().expect("no path"),
507507
current_window,
508-
obranch_name.unwrap_or("unknown branch".to_string()),
508+
obranch_name
509+
.or(status
510+
.head
511+
.clone()
512+
.and_then(|h| h.branch)
513+
.map(|b| b.name.to_string()))
514+
.unwrap_or_else(|| "unknown branch".to_string()),
509515
sender.clone(),
510516
ooid,
511517
);

src/status_view/render.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -923,10 +923,7 @@ impl ViewContainer for Line {
923923
} else {
924924
tags::SPACES_REMOVED
925925
};
926-
// do not add tag twice
927-
// magic 1 is for label
928-
println!("‼️ line_offset {:?} stripped_len {:?}", start_iter.line_offset(), stripped_len);
929-
start_iter.forward_chars((stripped_len + LINENO_MARGIN.len()) as i32 );
926+
start_iter.forward_chars((stripped_len + LINENO_MARGIN.len()) as i32);
930927
self.add_tag(
931928
buffer,
932929
spaces_tag,

0 commit comments

Comments
 (0)