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

Cannot search after "cc" in telescope #2698

Closed
Saafo opened this issue Sep 13, 2023 · 2 comments · Fixed by #2699
Closed

Cannot search after "cc" in telescope #2698

Saafo opened this issue Sep 13, 2023 · 2 comments · Fixed by #2699
Labels
bug Something isn't working

Comments

@Saafo
Copy link

Saafo commented Sep 13, 2023

Description

See ayamir/nvimdots#994

Neovim version

NVIM v0.9.1
Build type: Release
LuaJIT 2.1.0-beta3

Operating system and version

macOS 13.5.1

Telescope version / branch / rev

a197706

checkhealth telescope

==============================================================================
telescope: require("telescope.health").check()

Checking for required plugins ~
- OK plenary installed.
- OK nvim-treesitter installed.

Checking external dependencies ~
- OK rg: found ripgrep 13.0.0
- WARNING fd: not found. Install [sharkdp/fd](https://github.com/sharkdp/fd) for extended capabilities

===== Installed extensions ===== ~

Telescope Extension: `frecency` ~
- OK sqlite.lua installed.
- OK nvim-web-devicons installed.

Telescope Extension: `fzf` ~
- OK lib working as expected
- OK file_sorter correctly configured
- OK generic_sorter correctly configured

Telescope Extension: `live_grep_args` ~
- No healthcheck provided

Telescope Extension: `notify` ~
- No healthcheck provided

Telescope Extension: `persisted` ~
- No healthcheck provided

Telescope Extension: `projects` ~
- No healthcheck provided

Telescope Extension: `undo` ~
- No healthcheck provided

Telescope Extension: `zoxide` ~
- No healthcheck provided

Steps to reproduce

  1. open telescope(both file search or live grep are ok)
  2. input something(search works well)
  3. press esc, and cc to clean the search input
  4. input anything

Expected behavior

search continue works

Actual behavior

search don't works

Minimal config

require("telescope").setup({
	defaults = {
		prompt_prefix = " > ",
	},
})
@Saafo Saafo added the bug Something isn't working label Sep 13, 2023
@jamestrew
Copy link
Contributor

jamestrew commented Sep 14, 2023

Thanks for the report - I've able to reproduce this.
Something about having a leading space in the prompt_prefix looks to be throwing things off.

After playing around a bit, seems like a vim behavior issue(?).

  1. Open a empty buffer
  2. :set buftype=prompt
  3. :call prompt_setprompt(bufnr('%'), ' > ')
  4. go into insert mode, type stuff then go into normal mode and cc -> goes new line

^ this last behavior doesn't happen if you don't have a leading space in the prompt. Since telescope just gets the first line of the prompt, when doing cc with a the prompt >, the next inputs being put a line below doesn't get read.

@jamestrew
Copy link
Contributor

this PR should fix it #2699

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

Successfully merging a pull request may close this issue.

2 participants