mirror of https://github.com/helix-editor/helix
renamed get_view_areas -> get_areas
parent
8cf9e6c2b9
commit
64b662228f
|
@ -88,7 +88,7 @@ impl EditorView {
|
||||||
surface: &mut Surface,
|
surface: &mut Surface,
|
||||||
is_focused: bool,
|
is_focused: bool,
|
||||||
) {
|
) {
|
||||||
let areas = view.get_view_areas(doc);
|
let areas = view.get_areas(doc);
|
||||||
|
|
||||||
// TODO: use the 'areas' struct for these!
|
// TODO: use the 'areas' struct for these!
|
||||||
let inner = areas.text;
|
let inner = areas.text;
|
||||||
|
@ -768,7 +768,7 @@ impl EditorView {
|
||||||
let info = theme.get("info");
|
let info = theme.get("info");
|
||||||
let hint = theme.get("hint");
|
let hint = theme.get("hint");
|
||||||
|
|
||||||
let areas = view.get_view_areas(doc);
|
let areas = view.get_areas(doc);
|
||||||
let width = 50.min(areas.text.width);
|
let width = 50.min(areas.text.width);
|
||||||
|
|
||||||
let height = 15.min(areas.text.height); // .min(text.lines.len() as u16);
|
let height = 15.min(areas.text.height); // .min(text.lines.len() as u16);
|
||||||
|
|
|
@ -208,7 +208,7 @@ impl View {
|
||||||
self.docs_access_history.push(id);
|
self.docs_access_history.push(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_view_areas(&self, doc: &Document) -> ViewAreas {
|
pub fn get_areas(&self, doc: &Document) -> ViewAreas {
|
||||||
let config = doc.config.load();
|
let config = doc.config.load();
|
||||||
|
|
||||||
let gutter = self.gutter_offset(doc);
|
let gutter = self.gutter_offset(doc);
|
||||||
|
@ -269,7 +269,7 @@ impl View {
|
||||||
/// Returns the 'inner area' (the text renderable area) of the view.
|
/// Returns the 'inner area' (the text renderable area) of the view.
|
||||||
///
|
///
|
||||||
pub fn inner_area(&self, doc: &Document) -> Rect {
|
pub fn inner_area(&self, doc: &Document) -> Rect {
|
||||||
self.get_view_areas(doc).text
|
self.get_areas(doc).text
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn inner_height(&self) -> usize {
|
pub fn inner_height(&self) -> usize {
|
||||||
|
|
Loading…
Reference in New Issue