Skip to content

Commit 66872b7

Browse files
author
wes adams
committed
Statusline indicator to show number of selected chars
Feature request: #4624
1 parent 758bace commit 66872b7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

helix-term/src/ui/statusline.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,15 @@ where
247247
F: Fn(&mut RenderContext, String, Option<Style>) + Copy,
248248
{
249249
let count = context.doc.selection(context.view.id).len();
250+
let tot_sel = context.doc.selections().
251+
get(&context.view.id).
252+
unwrap().
253+
ranges()[0].
254+
len();
250255
write(
251256
context,
252-
format!(" {} sel{} ", count, if count == 1 { "" } else { "s" }),
257+
format!(" {} sel{} {}",
258+
count, if count == 1 { "" } else { "s" }, tot_sel),
253259
None,
254260
);
255261
}

0 commit comments

Comments
 (0)