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(actions): support commands with special chars #2224

Merged
merged 1 commit into from
Apr 26, 2023

Conversation

uga-rosa
Copy link
Contributor

@uga-rosa uga-rosa commented Nov 6, 2022

Description

It is inconvenient that commands containing strings such as <CR> cannot be edited using <C-e>.

Type of change

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

How Has This Been Tested?

Execute a command containing <CR> (e.g. nnoremap <CR> <CR>) to add it to the history, select the command in Telescope command_history, and press <C-e>.
This PR makes correctly enter the four characters <CR> into the cmdline.

Configuration:

  • Neovim version (nvim --version):
  • Operating system and version:

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)

@uga-rosa uga-rosa marked this pull request as ready for review November 6, 2022 14:42
@uga-rosa
Copy link
Contributor Author

uga-rosa commented Nov 6, 2022

Also, the flag for feedkey should be n. The user may have mapped something to the colon. For example, swapping a colon and a semicolon.

@uga-rosa
Copy link
Contributor Author

uga-rosa commented Nov 7, 2022

Please review

@uga-rosa
Copy link
Contributor Author

@Conni2461

Copy link
Member

@kkharji kkharji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just tested it out and indeed fixes the bug. Great job @uga-rosa

@kkharji kkharji changed the title fix(actions): allow command containing special character (e.g. <CR>) to be set fix(actions): support commands with special chars Apr 26, 2023
@kkharji kkharji merged commit 713d26b into nvim-telescope:master Apr 26, 2023
Conni2461 pushed a commit that referenced this pull request May 14, 2023
abelmul pushed a commit to abelmul/telescope.nvim that referenced this pull request Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants