refactor: rename to pad_selection_index_register

pull/13386/head
Omar Elmasri 2025-05-10 10:45:23 +03:00
parent b1f15ddebd
commit 48b8f5717d
3 changed files with 4 additions and 4 deletions

View File

@ -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"`

View File

@ -352,7 +352,7 @@ pub struct Config {
/// Enables smart tab
pub smart_tab: Option<SmartTabConfig>,
/// 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(),

View File

@ -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