Skip to content

Commit

Permalink
Remove indent style status-line display for now.
Browse files Browse the repository at this point in the history
  • Loading branch information
cessen committed Jun 14, 2021
1 parent 0830877 commit 1b80888
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions helix-term/src/ui/editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -500,28 +500,28 @@ impl EditorView {

// Compute the individual info strings.
let diag_count = format!("{}", doc.diagnostics().len());
let indent_info = match doc.indent_style {
IndentStyle::Tabs => "tabs",
IndentStyle::Spaces(1) => "spaces:1",
IndentStyle::Spaces(2) => "spaces:2",
IndentStyle::Spaces(3) => "spaces:3",
IndentStyle::Spaces(4) => "spaces:4",
IndentStyle::Spaces(5) => "spaces:5",
IndentStyle::Spaces(6) => "spaces:6",
IndentStyle::Spaces(7) => "spaces:7",
IndentStyle::Spaces(8) => "spaces:8",
_ => "indent:ERROR",
};
// let indent_info = match doc.indent_style {
// IndentStyle::Tabs => "tabs",
// IndentStyle::Spaces(1) => "spaces:1",
// IndentStyle::Spaces(2) => "spaces:2",
// IndentStyle::Spaces(3) => "spaces:3",
// IndentStyle::Spaces(4) => "spaces:4",
// IndentStyle::Spaces(5) => "spaces:5",
// IndentStyle::Spaces(6) => "spaces:6",
// IndentStyle::Spaces(7) => "spaces:7",
// IndentStyle::Spaces(8) => "spaces:8",
// _ => "indent:ERROR",
// };
let position_info = {
let pos = coords_at_pos(doc.text().slice(..), doc.selection(view.id).cursor());
format!("{}:{}", pos.row + 1, pos.col + 1) // convert to 1-indexing
};

// Render them to the status line together.
let right_side_text = format!(
"{} {} {} ",
"{} {} ",
&diag_count[..diag_count.len().min(4)],
indent_info,
// indent_info,
position_info
);
let text_len = right_side_text.len() as u16;
Expand Down

0 comments on commit 1b80888

Please sign in to comment.