Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix off-by-one in extend_line_above #3689

Merged

Commits on Sep 4, 2022

  1. Fix off-by-one in extend_line_above

    `extend_line_above` (and `extend_line` when facing backwards) skip
    a line when the current range does not fully cover a line.
    
    Before this change:
    
        foo
        b#[|a]#r
        baz
    
    With `extend_line_above` or `extend_line` selected the line above.
    
        #[|foo
        bar]#
        baz
    
    Which is inconsistent with `extend_line_below`. This commit changes
    the behavior to select the current line when it is not already
    selected.
    
        foo
        #[|bar]#
        baz
    
    Then further calls of `extend_line_above` extend the selection up
    line-wise.
    the-mikedavis committed Sep 4, 2022
    Configuration menu
    Copy the full SHA
    01df75a View commit details
    Browse the repository at this point in the history