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

Make retain_last_search text unselected #319

Closed
alexandr-san4ez opened this issue Sep 16, 2018 · 7 comments
Closed

Make retain_last_search text unselected #319

alexandr-san4ez opened this issue Sep 16, 2018 · 7 comments

Comments

@alexandr-san4ez
Copy link

Fixed: the space_as_tab setting is now ignored unless the caret is at the end of the search terms while the Space key is pressed

This does not work if the text is selected and caret is at the end.
default
If press <Space>, will be write space char. I think it less user friendly action.

@polyvertex
Copy link
Member

Well, I was not sure about how to handle that case to be honest. I thought, without being positive about it, it would be more conventional to keep it that way in that particular case.

For instance, would space_as_tab be honored in that case, how KP should interpret it? Should it erase the selection then simulate a Tab press? Makes little sense... Even if some text remains after deletion.

@alexandr-san4ez
Copy link
Author

alexandr-san4ez commented Sep 16, 2018

I forgot to mention about retain_last_search = yes. It store last command.

When I want reusing last command this is problematic. Because pressing erased text.
And need press Tab or move cursor to last position.

@polyvertex
Copy link
Member

polyvertex commented Sep 16, 2018

Again, to my knowledge, common behavior is to have text erased and replaced by a space character upon Space key press.

So the initial "issue" put aside, would you prefer to have the text unselected when the retain_last_search is enabled?

@alexandr-san4ez
Copy link
Author

Previously (version 2.16.3) is opening action list. Honestly, I'm used to it. ;-)
I think will be nice save this behavior.

We cannot check position of cursor after text is selected? Or this not have logic?

@polyvertex
Copy link
Member

polyvertex commented Sep 16, 2018

I still have to check but what may be done to avoid backward compatibility issues is to add a supported value to retain_last_search. Something like unselected in addition to already supported boolean values. So that KP would pop up with last search term unselected.

Would that be an acceptable solution to you?

@alexandr-san4ez
Copy link
Author

Yes, sure.

Thank you for your work!

@polyvertex polyvertex changed the title space_as_tab when text is selected Make retain_last_search text unselected Sep 16, 2018
@polyvertex
Copy link
Member

The type of the retain_last_search setting changed in v2.20 and now accepts unselected value

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants