Ask questionscentaur-tabs' `gt`/`gT` asking for more key input.

What did you expect to happen?

When pressing gt or gT, the tab should be switched immediately.

What actually happened?

Instead of switching immediately, it stops waiting for another keystroke.

Describe your attempts to resolve the issue

I saw that if you press SPC or a letter, it switches tabs, but if you press an arrow key, the message "No replacement character typed" appears. This message seems to come from .local/straight/repos/evil/evil-common.el:609.

I removed my config and tested with the default doom config, and there gt is bound to workspace switching and works normally. Enabling tabs the bug appears again. I tried to remove the keybinding for workspace (in case it was conflicting) but that does not solve the issue.

Steps to reproduce

Install doom and enable the tabs module. Open two tabs and try to switch with gt.

System Information


Answer questions holyfight6

@acristoffers Hi, I tried to edebug this and found out <C> will set the extra key's byte as the value of index. So I think this function should be like this

(evil-define-command +tabs:next-or-goto (index)
  "Switch to the next tab, or to INDEXth tab if a count is given."
  (interactive "P")
  (if index
      (centaur-tabs-select-visible-nth-tab index)

which takes the prefix as the tab index. Or it needs to to parse the key to number as the real index.

Github User Rank List