Handle extra prompt scenario where the prompt has trailing spaces leading to unwanted behaviour.
Context
The way trim_prompt works is that if the last character is ":" it trims it. But the issue is there are plugins like nvim-dap which send prompts like this "Configurations: " with an extra trailing space leading to the addition of extra space by my last pr for fzf backend https://github.com/stevearc/dressing.nvim/pull/136 to add an unwanted extra space. This pr fixes that behaviour.
Behaviour withou this pr
Behaviour with this pr
Description
It changes the prompts functionality by removing trailing spaces from prompts.
Handle extra prompt scenario where the prompt has trailing spaces leading to unwanted behaviour.
Context
The way trim_prompt works is that if the last character is ":" it trims it. But the issue is there are plugins like nvim-dap which send prompts like this "Configurations: " with an extra trailing space leading to the addition of extra space by my last pr for fzf backend https://github.com/stevearc/dressing.nvim/pull/136 to add an unwanted extra space. This pr fixes that behaviour.
Behaviour withou this pr![Screenshot 2024-01-18 063313](https://github.com/stevearc/dressing.nvim/assets/56352048/cb971a67-6b60-4644-97b4-c22f47784e0d)
Behaviour with this pr![Screenshot 2024-01-18 064157](https://github.com/stevearc/dressing.nvim/assets/56352048/17566b91-22c7-4836-8396-1b2a1d1338eb)
Description
It changes the prompts functionality by removing trailing spaces from prompts.
Test Plan
You can start a debug session to see the above difference.