summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWei Li <llwwns@gmail.com>2019-08-31 15:33:45 +0900
committerWei Li <llwwns@gmail.com>2019-08-31 15:33:45 +0900
commitf1ff953d4d34aab7dd8bce9d6cc5cc691d46944e (patch)
tree2a5f54134986db9308cf1619d9da31ceefe4ec5c
parent07cc0aefe5f5a140cb5c641a8ed5678ae01d9de6 (diff)
fmt
-rw-r--r--src/ui/grid/row.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/ui/grid/row.rs b/src/ui/grid/row.rs
index b2b1275..3058f27 100644
--- a/src/ui/grid/row.rs
+++ b/src/ui/grid/row.rs
@@ -235,12 +235,11 @@ impl Rope {
pub fn cell_at(&self, at: usize) -> Cell {
match self {
Rope::Leaf(leaf) => {
- let c = leaf.text.chars().nth(
- if leaf.double_width() {
- 0
- } else {
- at - 1
- }).unwrap();
+ let c = leaf
+ .text
+ .chars()
+ .nth(if leaf.double_width() { 0 } else { at - 1 })
+ .unwrap();
Cell {
text: c.to_string(),
hl_id: leaf.hl_id,