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

Bug in visual selection #74

Closed
Fabian-programmer opened this issue Nov 29, 2023 · 2 comments
Closed

Bug in visual selection #74

Fabian-programmer opened this issue Nov 29, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@Fabian-programmer
Copy link

Fabian-programmer commented Nov 29, 2023

Description

Hey, thanks for the plugin.

I just encountered the problem, I was visual selecting a text from right to left.
grafik

I think here lies the problem:

  local _, ls, cs = unpack(vim.fn.getpos("v"))
  local _, le, ce = unpack(vim.fn.getpos("."))

when you select text from right to left, then cs is bigger than ce.

so there needs to be a condition:

if cs > ce
  swap(cs,ce)
  swap(ls,le)

https://github.com/nvim-telescope/telescope-live-grep-args.nvim/blob/master/lua/telescope-live-grep-args/shortcuts.lua#L8

Neovim version

nvim 0.9.4

Operating system and version

ubuntu 22

Telescope version / branch / rev

latest

Telescope live grep args version / branch / rev

latest

checkhealth telescope

.

Steps to reproduce

.

Expected behavior

No response

Actual behavior

.

Minimal config

.
@Fabian-programmer Fabian-programmer added the bug Something isn't working label Nov 29, 2023
@weeman1337
Copy link
Collaborator

Thank you for reporting the issue @Fabian-programmer

This bug was already reported before #63 Also a pull request exists, which should be merged soon.

@weeman1337
Copy link
Collaborator

Duplicate of #63

@weeman1337 weeman1337 marked this as a duplicate of #63 Dec 15, 2023
@weeman1337 weeman1337 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 15, 2023
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