fix hint position when using contrast=1 and position off_left

This commit is contained in:
Federico Ciuffardi 2021-01-17 14:21:01 -03:00 committed by Ferran Basora
parent 187cce81d2
commit 027ded9339

View File

@ -129,7 +129,7 @@ impl<'a> View<'a> {
if let Some(ref hint) = mat.hint {
let extra_position = match self.position {
"right" => text.width_cjk() - hint.len(),
"off_left" => 0 - hint.len(),
"off_left" => 0 - hint.len() - if self.contrast { 2 } else { 0 },
"off_right" => text.width_cjk(),
_ => 0,
};