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

Add extend variants for tree-sitter textobjects #3266

Merged
merged 4 commits into from
Oct 3, 2022

Commits on Sep 22, 2022

  1. Use requested direction for new textobject selection range

    This changes the behavior of operations like `]f`/`[f` to set the
    direction of the new range to the direction of the action.
    
    The original behavior was to always use the head of the next function.
    This is inconsistent with the behavior of goto_next_paragraph and makes
    it impossible to create extend variants of the textobject motions.
    
    This causes a behavior change when there are nested functions. The
    behavior in the parent commit is that repeated uses of `]f` will
    select every function in the file even if nested. With this commit,
    functions are skipped.
    
    It's notable that it's possible to emulate the original behavior by
    using the `ensure_selections_forward` (A-:) command between invocations
    of `]f`.
    the-mikedavis committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    3f27971 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    99bde07 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    98d4e4f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    08879ca View commit details
    Browse the repository at this point in the history