aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src/editor.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-view/src/editor.rs')
-rw-r--r--helix-view/src/editor.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs
index bcd8dedb..db97cbb1 100644
--- a/helix-view/src/editor.rs
+++ b/helix-view/src/editor.rs
@@ -456,6 +456,7 @@ impl std::str::FromStr for GutterType {
fn from_str(s: &str) -> Result<Self, Self::Err> {
match s.to_lowercase().as_str() {
"diagnostics" => Ok(Self::Diagnostics),
+ "spacer" => Ok(Self::Spacer),
"line-numbers" => Ok(Self::LineNumbers),
_ => anyhow::bail!("Gutter type can only be `diagnostics` or `line-numbers`."),
}
@@ -589,7 +590,11 @@ impl Default for Config {
line_number: LineNumber::Absolute,
cursorline: false,
cursorcolumn: false,
- gutters: vec![GutterType::Diagnostics, GutterType::LineNumbers],
+ gutters: vec![
+ GutterType::Diagnostics,
+ GutterType::Spacer,
+ GutterType::LineNumbers,
+ ],
middle_click_paste: true,
auto_pairs: AutoPairConfig::default(),
auto_completion: true,
@@ -1308,7 +1313,7 @@ impl Editor {
.primary()
.cursor(doc.text().slice(..));
if let Some(mut pos) = view.screen_coords_at_pos(doc, doc.text().slice(..), cursor) {
- let inner = view.inner_area();
+ let inner = view.inner_area(doc);
pos.col += inner.x as usize;
pos.row += inner.y as usize;
let cursorkind = config.cursor_shape.from_mode(self.mode);