mirror of https://github.com/helix-editor/helix
parent
871f12b751
commit
b68aa35bf4
|
@ -122,7 +122,7 @@ impl EditorView {
|
||||||
[Left] vec![
|
[Left] vec![
|
||||||
"type ".into(),
|
"type ".into(),
|
||||||
Span::styled(":theme", theme.get("markup.raw")),
|
Span::styled(":theme", theme.get("markup.raw")),
|
||||||
" to choose a color scheme".into(),
|
" to choose a theme".into(),
|
||||||
],
|
],
|
||||||
[Left] vec![
|
[Left] vec![
|
||||||
"type ".into(),
|
"type ".into(),
|
||||||
|
@ -170,10 +170,10 @@ impl EditorView {
|
||||||
// towards the end it is low. Therefore to achieve an optical balance we must
|
// towards the end it is low. Therefore to achieve an optical balance we must
|
||||||
// do a little offset
|
// do a little offset
|
||||||
//
|
//
|
||||||
// this padding of 4 is not cruicial though, so if we can't fit it on the screen
|
// this padding of 3 is not cruicial though, so if we can't fit it on the screen
|
||||||
// we just decrease it until it is 0. Once that happens, if it still overflows
|
// we just decrease it until it is 0. Once that happens, if it still overflows
|
||||||
// we don't want to draw the welcome screen.
|
// we don't want to draw the welcome screen.
|
||||||
let padding = 4.min(max_padding.max(0) as u16);
|
let padding = 3.min(max_padding.max(0) as u16);
|
||||||
|
|
||||||
let x_start_left =
|
let x_start_left =
|
||||||
padding + view.area.x + (view.area.width / 2).saturating_sub(longest_left as u16 / 2);
|
padding + view.area.x + (view.area.width / 2).saturating_sub(longest_left as u16 / 2);
|
||||||
|
|
|
@ -208,7 +208,7 @@ pub struct Document {
|
||||||
// large refactor that would make `&mut Editor` available on the `DocumentDidChange` event.
|
// large refactor that would make `&mut Editor` available on the `DocumentDidChange` event.
|
||||||
pub color_swatch_controller: TaskController,
|
pub color_swatch_controller: TaskController,
|
||||||
|
|
||||||
/// Whether to render the dashboard when opening the document
|
/// Whether to render the welcome screen when opening the document
|
||||||
pub is_welcome: bool,
|
pub is_welcome: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -247,7 +247,7 @@ where
|
||||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||||
#[serde(rename_all = "kebab-case", default, deny_unknown_fields)]
|
#[serde(rename_all = "kebab-case", default, deny_unknown_fields)]
|
||||||
pub struct Config {
|
pub struct Config {
|
||||||
/// Whether to enable the dashboard
|
/// Whether to enable the welcome screen
|
||||||
pub welcome_screen: bool,
|
pub welcome_screen: bool,
|
||||||
/// Padding to keep between the edge of the screen and the cursor when scrolling. Defaults to 5.
|
/// Padding to keep between the edge of the screen and the cursor when scrolling. Defaults to 5.
|
||||||
pub scrolloff: usize,
|
pub scrolloff: usize,
|
||||||
|
|
Loading…
Reference in New Issue