diff --git a/book/src/editor.md b/book/src/editor.md index 7356c09f7..98a7e2a45 100644 --- a/book/src/editor.md +++ b/book/src/editor.md @@ -55,7 +55,7 @@ | `insert-final-newline` | Whether to automatically insert a trailing line-ending on write if missing | `true` | | `trim-final-newlines` | Whether to automatically remove line-endings after the final one on write | `false` | | `trim-trailing-whitespace` | Whether to automatically remove whitespace preceding line endings on write | `false` | -| `padding_selection_index_register` | Whether to align selection indices register with zero padding | `false` | +| `pad_selection_index_register` | Whether to align selection indices register with zero padding | `false` | | `popup-border` | Draw border around `popup`, `menu`, `all`, or `none` | `none` | | `indent-heuristic` | How the indentation for a newly inserted line is computed: `simple` just copies the indentation level from the previous line, `tree-sitter` computes the indentation based on the syntax tree and `hybrid` combines both approaches. If the chosen heuristic is not available, a different one will be used as a fallback (the fallback order being `hybrid` -> `tree-sitter` -> `simple`). | `hybrid` | `jump-label-alphabet` | The characters that are used to generate two character jump labels. Characters at the start of the alphabet are used first. | `"abcdefghijklmnopqrstuvwxyz"` diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs index c3952d3db..2e81ae8a0 100644 --- a/helix-view/src/editor.rs +++ b/helix-view/src/editor.rs @@ -352,7 +352,7 @@ pub struct Config { /// Enables smart tab pub smart_tab: Option, /// Enables padding selection indecis register - pub padding_selection_index_register: bool, + pub pad_selection_index_register: bool, /// Draw border around popups. pub popup_border: PopupBorderConfig, /// Which indent heuristic to use when a new line is inserted @@ -1016,7 +1016,7 @@ impl Default for Config { trim_final_newlines: false, trim_trailing_whitespace: false, smart_tab: Some(SmartTabConfig::default()), - padding_selection_index_register: false, + pad_selection_index_register: false, popup_border: PopupBorderConfig::None, indent_heuristic: IndentationHeuristic::default(), jump_label_alphabet: ('a'..='z').collect(), diff --git a/helix-view/src/register.rs b/helix-view/src/register.rs index ada12722f..af34588a6 100644 --- a/helix-view/src/register.rs +++ b/helix-view/src/register.rs @@ -46,7 +46,7 @@ impl Registers { '#' => { let (view, doc) = current_ref!(editor); let selections = doc.selection(view.id).len(); - let number_of_digits = if editor.config().padding_selection_index_register { + let number_of_digits = if editor.config().pad_selection_index_register { selections.ilog10() as usize + 1 } else { 0