Fix for two bugs from the previous refactor.
This commit is contained in:
parent
bfeaee602c
commit
e5cac79829
|
@ -14,6 +14,9 @@ edition = "2018"
|
||||||
name = "led"
|
name = "led"
|
||||||
path = "src/main.rs"
|
path = "src/main.rs"
|
||||||
|
|
||||||
|
[profile.release]
|
||||||
|
debug = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
ropey = "1"
|
ropey = "1"
|
||||||
# ropey = { git = "https://github.com/cessen/ropey", branch = "master" }
|
# ropey = { git = "https://github.com/cessen/ropey", branch = "master" }
|
||||||
|
|
|
@ -147,7 +147,7 @@ impl LineFormatter {
|
||||||
|
|
||||||
// Get the vertical size of the block and the vertical
|
// Get the vertical size of the block and the vertical
|
||||||
// position of the char_idx within it.
|
// position of the char_idx within it.
|
||||||
let block_v_dim = (block_vis_iter.clone().last().unwrap().1).0 + 1;
|
let block_v_dim = block_vis_iter.clone().last().map(|n| (n.1).0).unwrap_or(0) + 1;
|
||||||
let char_v_pos = block_vis_iter.clone().vpos(char_offset);
|
let char_v_pos = block_vis_iter.clone().vpos(char_offset);
|
||||||
|
|
||||||
// Get the char's vertical position within the block after offset
|
// Get the char's vertical position within the block after offset
|
||||||
|
|
|
@ -606,6 +606,8 @@ impl TermUI {
|
||||||
|
|
||||||
char_index += char_count(&g);
|
char_index += char_count(&g);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
screen_line += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we get here, it means we reached the end of the text buffer
|
// If we get here, it means we reached the end of the text buffer
|
||||||
|
|
Loading…
Reference in New Issue
Block a user