Skip to content

Commit d2cde7d

Browse files
author
au.ganzha
committed
deleted line label
1 parent 2e704e3 commit d2cde7d

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

src/status_view/render.rs

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -862,11 +862,29 @@ impl ViewContainer for Line {
862862
.unwrap_or(self.old_line_no.map(|num| num.as_i32()).unwrap_or(0));
863863

864864
let line_no_text = match self.origin {
865-
DiffLineType::Deletion => "<span size=\"small\" foreground=\"red\" line_height=\"0.5\">-</span>".to_string(),
865+
DiffLineType::Deletion => {
866+
format!(
867+
"<span size=\"small\" foreground=\"red\" weight=\"bold\" line_height=\"0.5\">{}</span>",
868+
match line_no {
869+
0..10 => {
870+
"-"
871+
},
872+
10..100 => {
873+
" -"
874+
},
875+
100..1000 => {
876+
" -"
877+
},
878+
_ => {
879+
" -"
880+
}
881+
}
882+
)
883+
}
866884
_ => format!(
867885
"<span size=\"small\" line_height=\"0.5\">{}</span>",
868886
line_no
869-
)
887+
),
870888
};
871889

872890
if !anchor.widgets().is_empty() {

0 commit comments

Comments
 (0)