1
0
зеркало из https://github.com/glebtv/tui-textarea.git synced 2026-09-03 06:16:17 +03:00

disable line numbers when right or center alignment is set

Этот коммит содержится в:
rhysd
2022-09-28 21:23:41 +09:00
родитель ffd8b1c5f7
Коммит 0ffaee324f

Просмотреть файл

@@ -1274,6 +1274,9 @@ impl<'a> TextArea<'a> {
/// Get alignment text
pub fn set_alignment(&mut self, alignment: Alignment) {
if let Alignment::Center | Alignment::Right = alignment {
self.line_number_style = None;
}
self.alignment = alignment;
}