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

can't tab through input fields in project search after latest update #18575

Closed
1 task done
hedefalk opened this issue Oct 1, 2024 · 5 comments
Closed
1 task done

can't tab through input fields in project search after latest update #18575

hedefalk opened this issue Oct 1, 2024 · 5 comments
Labels
bug [core label] keybinds Keyboard shortcuts, mapping, binding, keymaps, etc search buffer search, project search, etc

Comments

@hedefalk
Copy link

hedefalk commented Oct 1, 2024

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

I have:

  {
    "context": "Editor && !showing_completions",
    "bindings": {
      "tab": "editor::Indent"
    }
  }

for indenting in editor context only.

Since last update I cannot tab through the fields of project search, but just insert tabs instead:

image

I'm positive this worked before but it seems the "Editor && !showing_completions" context is now active even if cursor is in project search. If I remove my keysettings it works as normal.

Environment

Zed: v0.154.3 (Zed)
OS: macOS 14.6.1
Memory: 16 GiB
Architecture: aarch64

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your Zed.log file to this issue.

Zed.log
@hedefalk hedefalk added admin read bug [core label] labels Oct 1, 2024
@hedefalk
Copy link
Author

hedefalk commented Oct 1, 2024

I've tried all kinds of resetting by looking at defaultkeymap but nothing seems to work but removing my existing keymap for tab:

{
    "context": "ProjectSearchBar",
    "bindings": {
      "tab": "menu::SelectNext"
    }
  },

  {
    "context": "ProjectSearchBar > Editor",
    "bindings": {
      "tab": "menu::SelectNext"
    }
  },
  {
    "context": "ProjectSearchBar && in_replace > Editor",
    "bindings": {
      "tab": "menu::SelectNext"
    }
  },
  {
    "context": "ProjectSearchView",
    "bindings": {
      "tab": "menu::SelectNext"
    }
  }

Is there any good documentation on these contexts?

@CharlesChen0823
Copy link
Contributor

this is interesting, i don't set any keybindings for this, tab always worked IIRC in windows.

@JosephTLyons
Copy link
Collaborator

I also don't have any keybindings and tab has always worked for me to cycle through input fields in project search. 🤔

@JosephTLyons JosephTLyons added keybinds Keyboard shortcuts, mapping, binding, keymaps, etc search buffer search, project search, etc and removed triage labels Oct 3, 2024
@notpeter
Copy link
Member

notpeter commented Dec 3, 2024

There is some context documentation here:

But it definitely needs some work:

We've recently added debug: open key context view (accessible from the command palette) which definitely can help shed some light on this stuff:

Screenshot 2024-12-03 at 16 20 04

The above is the "Find in files" and it's Editor && mode=single_line while in a normal editor it's Editor && mode=full. You should be able to adjust your keybindings appropriately, either by changing the context of your existing bind or by rebinding Editor::Tab in the BufferSearchBar context.

There's definitely some complexity here, but I think this is behaving as designed.

@notpeter notpeter closed this as not planned Won't fix, can't repro, duplicate, stale Dec 3, 2024
@hedefalk
Copy link
Author

hedefalk commented Jan 23, 2025

I still can't figure this out.

I have:

{
    "context": "Editor && !showing_completions",
    "bindings": {
      "tab": "editor::Indent"
    }
  },
  {
    "context": "ProjectSearchBar > Editor",
    "bindings": {
      "tab": "menu::SelectNext"
    }
  }

According to the rules defined at https://zed.dev/docs/key-bindings#precedence they are of the same level and therefore the latter one should take precendence. It doesn't:

Image

The other suggestion with Editor && mode=single_line doesn't parse?

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug [core label] keybinds Keyboard shortcuts, mapping, binding, keymaps, etc search buffer search, project search, etc
Projects
None yet
Development

No branches or pull requests

4 participants