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

Text object @parameter does not work after undo with u #498

Open
AnhQuanTrl opened this issue Oct 5, 2023 · 1 comment
Open

Text object @parameter does not work after undo with u #498

AnhQuanTrl opened this issue Oct 5, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@AnhQuanTrl
Copy link

Describe the bug
When I use dia or daa (my configured commands to delete inner parameter and outer parameter respectively), after undoing those commands with u, I cannot use ia or aa to select parameter in the current buffer anymore. I have to open a new buffer for them to work again.

To Reproduce
Steps to reproduce the behavior:

  1. Open a csharp file with configured treesitter and treesitter textobjects.
  2. Trigger command to delete inner or outer parameter using @parameter text object.
  3. Press u to undo the change.
  4. Try to select another parameter, it will not work.

Expected behavior
@parameter TextObject should work regardless of whether or not I press u.

Output of :checkhealth nvim-treesitter

Installation ~

  • WARNING tree-sitter executable not found (parser generator, only needed for :TSInstallFromGrammar, not required for :TSInstall)
  • OK node found v18.18.0 (only needed for :TSInstallFromGrammar)
  • OK git executable found.
  • OK cc executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" }
    Version: cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
  • OK Neovim was compiled with tree-sitter runtime ABI version 14 (required >=13). Parsers must be compatible with runtime ABI.

OS Info:
{
machine = "x86_64",
release = "5.15.90.1-microsoft-standard-WSL2",
sysname = "Linux",
version = "#1 SMP Fri Jan 27 02:56:13 UTC 2023"
} ~

Parser/Features H L F I J

  • c ✓ ✓ ✓ ✓ ✓
  • c_sharp ✓ ✓ ✓ . ✓
  • cpp ✓ ✓ ✓ ✓ ✓
  • go ✓ ✓ ✓ ✓ ✓
  • javascript ✓ ✓ ✓ ✓ ✓
  • lua ✓ ✓ ✓ ✓ ✓
  • luadoc ✓ . . . .
  • luap ✓ . . . .
  • markdown ✓ . ✓ ✓ ✓
  • python ✓ ✓ ✓ ✓ ✓
  • rust ✓ ✓ ✓ ✓ ✓
  • tsx ✓ ✓ ✓ ✓ ✓
  • typescript ✓ ✓ ✓ ✓ ✓
  • vim ✓ ✓ ✓ . ✓
  • vimdoc ✓ . . . ✓

Legend: H[ighlight], L[ocals], F[olds], I[ndents], In[j]ections
+) multiple parsers found, only one will be used
x) errors found in the query, try to run :TSUpdate {lang} ~

Output of nvim --version

NVIM v0.10.0-dev
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Run "nvim -V1 -v" for more info

Additional context
Add any other context about the problem here.

@AnhQuanTrl AnhQuanTrl added the bug Something isn't working label Oct 5, 2023
@theHamsta
Copy link
Member

Maybe we're missing an explicit reparse request after this

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