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

find: support escaping backslash, fix double-bolding, and add basic tests #2589

Merged
merged 4 commits into from
Oct 14, 2024

Commits on Oct 13, 2024

  1. test: add basic tests for built-in find plugin

    Co-authored-by: Florian Strzelecki <florian.strzelecki@gmail.com>
    dgw and Exirel committed Oct 13, 2024
    Configuration menu
    Copy the full SHA
    e9d3509 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d4cacab View commit details
    Browse the repository at this point in the history
  3. test: verify more find behaviors

    Check that correcting someone else's line works as expected, and check
    that replacing an already-replaced line works as expected.
    
    Also check that case-insensitive (i) and global (g) flags work as
    expected, both separately and together.
    
    Note: There is a glitch in formatting when the new replacement occurs
    inside the previous one, since the bolding used to indicate what changed
    is kept in the stored line. We might wish to fix that at some point, but
    the new test correctly represents the real behavior.
    dgw committed Oct 13, 2024
    Configuration menu
    Copy the full SHA
    04a5b43 View commit details
    Browse the repository at this point in the history
  4. find: fix bolding when replacing inside a previous replacement

    Perform the replacement with an unformatted version of the substitute
    string, then create a display version with bolding added only after the
    matching line (if any) is found.
    
    Updated the corresponding test case. Also renamed some local vars in the
    `find` plugin file to make a bit more sense (but not too dramatic).
    dgw committed Oct 13, 2024
    Configuration menu
    Copy the full SHA
    18106f8 View commit details
    Browse the repository at this point in the history