Skip to content

Multiline increment <C-a> leaves the cursor in the wrong places #3984

Closed
@olafmustafar

Description

@olafmustafar

Summary

When incrementing multiple lines using on númers like '9' makes the cursors go to the wrong places after the increment
Example:
Peek 26-09-2022 18-52

Reproduction Steps

I tried this:

  • Open helix
  • Insert a couple of númber '9' in more than one line
  • Navigate to the first line
  • Select all lines with C
  • Increment with

I expected this to happen:
image

Instead, this happened:
image

Helix log

2022-09-26T19:01:32.998 helix_loader [DEBUG] Located configuration folders: []
2022-09-26T19:01:33.007 helix_view::clipboard [INFO] Using xclip to interact with the system and selection (primary) clipboard
2022-09-26T19:01:33.007 mio::poll [TRACE] registering event source with poller: token=Token(1), interests=READABLE | WRITABLE
2022-09-26T19:01:33.007 mio::poll [TRACE] registering event source with poller: token=Token(2), interests=READABLE | WRITABLE
2022-09-26T19:01:33.007 mio::poll [TRACE] registering event source with poller: token=Token(0), interests=READABLE
2022-09-26T19:01:33.007 mio::poll [TRACE] registering event source with poller: token=Token(1), interests=READABLE
2022-09-26T19:01:34.410 helix_term::commands [TRACE] entering insert mode with sel: Selection { ranges: [Range { anchor: 0, head: 1, horiz: None }], primary_index: 0 }, text: "\n"
2022-09-26T19:01:35.287 helix_core::auto_pairs [TRACE] autopairs hook selection: Selection {
    ranges: [
        Range {
            anchor: 1,
            head: 0,
            horiz: None,
        },
    ],
    primary_index: 0,
}
2022-09-26T19:01:35.858 helix_core::auto_pairs [TRACE] autopairs hook selection: Selection {
    ranges: [
        Range {
            anchor: 3,
            head: 2,
            horiz: None,
        },
    ],
    primary_index: 0,
}
2022-09-26T19:01:36.485 helix_core::auto_pairs [TRACE] autopairs hook selection: Selection {
    ranges: [
        Range {
            anchor: 5,
            head: 4,
            horiz: None,
        },
    ],
    primary_index: 0,
}
2022-09-26T19:01:41.660 helix_term::job [DEBUG] waiting on jobs...
2022-09-26T19:01:41.661 mio::poll [TRACE] deregistering event source from poller
2022-09-26T19:01:41.661 mio::poll [TRACE] deregistering event source from poller
2022-09-26T19:01:41.661 mio::poll [TRACE] deregistering event source from poller

Platform

Linux

Terminal Emulator

kitty 0.15.0

Helix Version

helix 22.08.1 (5467c65)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-helix-termArea: Helix term improvementsC-bugCategory: This is a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions