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

Fix some issues with builtin.colorscheme #3244

Merged
merged 2 commits into from
Aug 13, 2024
Merged

Fix some issues with builtin.colorscheme #3244

merged 2 commits into from
Aug 13, 2024

Conversation

ronandalton
Copy link
Contributor

Description

This PR fixes a couple of issues I found with the current implementation of builtin.colorscheme. Currently two problems can be observed:

  • The color scheme changes when searching, even when enable_preview is false. Shifting the selection behaves as expected however.
  • Color schemes cannot be previewed by clicking with the mouse when enable_preview is set to true.

The code is modified to fix these issues.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Test A:
    1. Run :Telescope colorscheme enable_preview=false
    2. Start searching for something
    3. Note that the color scheme is not changed until the enter key is pressed
  • Test B
    1. Run :Telescope colorscheme enable_preview=true
    2. Use the mouse to click on one of the options
    3. Observe that the color scheme is changed
    4. Exit Telescope and the original color scheme should be restored

Configuration:

  • Neovim version (nvim --version): v0.10.1
  • Operating system and version: Linux 6.9.3

Checklist:

  • My code follows the style guidelines of this project (stylua)
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (lua annotations)

@ronandalton
Copy link
Contributor Author

Note that I couldn't find any existing issues documenting these problems, which is why there are no issues linked. I can create them if that's a requirement.

@jamestrew jamestrew merged commit 3bb24bb into nvim-telescope:master Aug 13, 2024
12 checks passed
@jamestrew
Copy link
Contributor

Thanks!

@jamestrew jamestrew added the backport-0.1.x PR to be backported to 0.1.x (Neovim 0.7 compat) label Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-0.1.x PR to be backported to 0.1.x (Neovim 0.7 compat)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants