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

Incsearch support for :global #894

Merged
merged 36 commits into from
Jun 3, 2024

Commits on May 30, 2024

  1. Rename Range and related classes to Address

    An address evaluates to a line, and a range is a collection of addresses
    citizenmatt committed May 30, 2024
    Configuration menu
    Copy the full SHA
    485c390 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    91a1ae5 View commit details
    Browse the repository at this point in the history
  3. Remove mutable state from Range

    Sometimes we cache things, and other times it's relative to a passed caret. Let's always calculate it
    citizenmatt committed May 30, 2024
    Configuration menu
    Copy the full SHA
    c67dcb2 View commit details
    Browse the repository at this point in the history
  4. Introduce addresses for current line and last line

    Remove mutation from LineAddress
    citizenmatt committed May 30, 2024
    Configuration menu
    Copy the full SHA
    7829037 View commit details
    Browse the repository at this point in the history
  5. Remove Range overloads that don't require a caret

    Provide caret when calling from Command
    citizenmatt committed May 30, 2024
    Configuration menu
    Copy the full SHA
    25ffa42 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    3956cf7 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    0231576 View commit details
    Browse the repository at this point in the history
  8. Rename test classes

    Also ensure that test derives from VimTestCase so that injector is correctly initialised
    citizenmatt committed May 30, 2024
    Configuration menu
    Copy the full SHA
    e25559a View commit details
    Browse the repository at this point in the history
  9. Fix off-by-one error in count

    Count needs to be one-based, lines must be zero-based. So store addresses as one-based until processed
    citizenmatt committed May 30, 2024
    Configuration menu
    Copy the full SHA
    bc0272d View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    1df28b6 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    6a131ad View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    a408164 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    f22a2e6 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    92ef838 View commit details
    Browse the repository at this point in the history
  15. Add tests for goto character command

    Also start to refactor handling of count
    citizenmatt committed May 30, 2024
    Configuration menu
    Copy the full SHA
    06a6c41 View commit details
    Browse the repository at this point in the history
  16. Add tests and fixes for goto line command

    Correctly handles some validation, and also allows going to line zero
    citizenmatt committed May 30, 2024
    Configuration menu
    Copy the full SHA
    f9d3962 View commit details
    Browse the repository at this point in the history
  17. Add tests and fixes for delete lines command

    Validates register before use and correctly uses register and count
    citizenmatt committed May 30, 2024
    Configuration menu
    Copy the full SHA
    9cbee21 View commit details
    Browse the repository at this point in the history
  18. Simplify getCount functions

    Made it explicit to get the count from argument and/or range. Default count is not passed, because it was never used. Added some tests where possible, but hard to test select file and friends
    citizenmatt committed May 30, 2024
    Configuration menu
    Copy the full SHA
    7fe1991 View commit details
    Browse the repository at this point in the history
  19. Add tests and fixes for shift commands

    Shift left and right now work with counts, validate the counts and move the caret to the correct end position
    citizenmatt committed May 30, 2024
    Configuration menu
    Copy the full SHA
    d76afdb View commit details
    Browse the repository at this point in the history
  20. Add tests and fixes for print command

    Handles validation of count and correctly moves caret to end of range after execution. Also fix issue where the results of :print are accumulated and not cleared.
    
    Fixes VIM-2570
    citizenmatt committed May 30, 2024
    Configuration menu
    Copy the full SHA
    e1232db View commit details
    Browse the repository at this point in the history
  21. Add tests and fixes for join command

    Handles validation for count and positions caret in the correct place. Also handles join with visual multicaret scenarios.
    citizenmatt committed May 30, 2024
    Configuration menu
    Copy the full SHA
    3b94976 View commit details
    Browse the repository at this point in the history
  22. Add tests and fixes for yank command

    Handles validation for count and ensures correct behaviour for registers.
    citizenmatt committed May 30, 2024
    Configuration menu
    Copy the full SHA
    2684e63 View commit details
    Browse the repository at this point in the history
  23. Minor refactorings

    citizenmatt committed May 30, 2024
    Configuration menu
    Copy the full SHA
    46a3341 View commit details
    Browse the repository at this point in the history
  24. Refactor handling of default range

    Specify a default range instead of default line for count.
    citizenmatt committed May 30, 2024
    Configuration menu
    Copy the full SHA
    fa970c7 View commit details
    Browse the repository at this point in the history
  25. Support incsearch highlighting for global command

    Fixes VIM-2891
    citizenmatt committed May 30, 2024
    Configuration menu
    Copy the full SHA
    f3700d3 View commit details
    Browse the repository at this point in the history
  26. Support 0 as part of a range address

    Fixes VIM-1137
    citizenmatt committed May 30, 2024
    Configuration menu
    Copy the full SHA
    c4714e0 View commit details
    Browse the repository at this point in the history
  27. Fix range with missing last address

    Fixes VIM-992
    citizenmatt committed May 30, 2024
    Configuration menu
    Copy the full SHA
    c2729c1 View commit details
    Browse the repository at this point in the history
  28. Clear ex output after assert and fix tests

    This ensures that a failing action doesn't pass due to previous state
    citizenmatt committed May 30, 2024
    Configuration menu
    Copy the full SHA
    5faeea2 View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    4e77d8f View commit details
    Browse the repository at this point in the history
  30. Fix move command moving to current line

    Removes a workaround that would break moving a range to the current line because it would always move the caret to the start of the range. Now positions the caret to the start of the selection if there is one. This also means we can remove the SAVE_VISUAL flag from JoinLinesCommand
    
    Fixes VIM-2936
    citizenmatt committed May 30, 2024
    Configuration menu
    Copy the full SHA
    41f53e3 View commit details
    Browse the repository at this point in the history
  31. Reintroduce ProcessGroup.startExEntry

    We need to share the implementation between starting an Ex command, and starting a filter command, which is just an Ex command with initial text
    citizenmatt committed May 30, 2024
    Configuration menu
    Copy the full SHA
    2362d67 View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    2ae3f92 View commit details
    Browse the repository at this point in the history
  33. Remove unused branch in SortCommand

    Commands are executed in Normal mode, although there may be multiple carets
    citizenmatt committed May 30, 2024
    Configuration menu
    Copy the full SHA
    f24ada3 View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    1987a15 View commit details
    Browse the repository at this point in the history
  35. Fix [count]: initial range text in ex field

    Fixes regression from changes in ex field handling
    citizenmatt committed May 30, 2024
    Configuration menu
    Copy the full SHA
    26d1e81 View commit details
    Browse the repository at this point in the history
  36. Fix incsearch highlights with operator count

    E.g. `2"a3"b4"c5d6/foo` will now highlight the current match correctly
    citizenmatt committed May 30, 2024
    Configuration menu
    Copy the full SHA
    fa18d23 View commit details
    Browse the repository at this point in the history