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

Changing argument to wezterm.action.Search has no effect when argument is an empty string #6019

Open
mrdziuban opened this issue Aug 23, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@mrdziuban
Copy link

What Operating System(s) are you seeing this problem on?

macOS

Which Wayland compositor or X11 Window manager(s) are you using?

No response

WezTerm version

20240812-215703-30345b36

Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

Yes, and I updated the version box above to show the version of the nightly that I tried

Describe the bug

When updating my config to switch between wezterm.action.Search({ CaseInSensitiveString = "" }) and wezterm.action.Search({ CaseSensitiveString = "" }), the change is not automatically applied. It seems like this is because of the empty string argument. If I change the empty string to anything else, e.g. a space " ", then the config change takes effect.

To Reproduce

  1. Update config to use case insensitive search with an empty string argument
    config.keys = {
      {
        key = "f",
        mods = "SUPER",
        action = wezterm.action.Search({ CaseInSensitiveString = "" })
      },
    }
  2. Search for something and note the search bar says ignore-case
  3. Update config to use case sensitive search with an empty string argument
    config.keys = {
      {
        key = "f",
        mods = "SUPER",
        action = wezterm.action.Search({ CaseSensitiveString = "" })
      },
    }
  4. Search again and note the search bar still says ignore-case
  5. Change the empty string argument to anything non-empty, e.g. a space " "
  6. Search again and note the search bar now correctly says case-sensitive

Configuration

config.keys = {
  {
    key = "f",
    mods = "SUPER",
    action = wezterm.action.Search({ CaseInSensitiveString = "" })
  },
}

Expected Behavior

The change should take effect regardless of whether the string is empty or not

Logs

Nothing was logged

Anything else?

Here's a video demonstrating the issue:

Screen.Recording.2024-08-23.at.10.14.47.AM.mov
@mrdziuban mrdziuban added the bug Something isn't working label Aug 23, 2024
@bofm
Copy link

bofm commented Jan 9, 2025

Workaround: in search mode CTRL-R to change the search matching mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants