add the convenient API for setting tab width
This commit is contained in:
parent
e16b39f29c
commit
7c25fcb7ae
1 changed files with 5 additions and 0 deletions
|
|
@ -1379,6 +1379,11 @@ impl<'a> BorrowedWithFontSystem<'a, Buffer> {
|
|||
.set_metrics_and_size(self.font_system, metrics, width_opt, height_opt);
|
||||
}
|
||||
|
||||
/// Set tab width (number of spaces between tab stops)
|
||||
pub fn set_tab_width(&mut self, tab_width: u16) {
|
||||
self.inner.set_tab_width(self.font_system, tab_width);
|
||||
}
|
||||
|
||||
/// Set text of buffer, using provided attributes for each line by default
|
||||
pub fn set_text(&mut self, text: &str, attrs: Attrs, shaping: Shaping) {
|
||||
self.inner.set_text(self.font_system, text, attrs, shaping);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue