substance / texture

A visual editor for research.
MIT License
1k stars 85 forks source link

Find and replace: use currently selected text to populate search field #902

Open Integral opened 6 years ago

Integral commented 6 years ago

We think, that focusing the replace field only makes sense when opening the f'n'r dialog with a selected text. Then the search field is populated with the selected text, and the replace field is focused to allow a frictionless workflow. Otherwise it does not make sense to focus the replace field.

obuchtala commented 6 years ago

Just for the records, Visual Code is putting focus in find input when it is empty and replace input otherwise.

obuchtala commented 6 years ago

Sublime is always putting focus into find.

Integral commented 6 years ago

It totally makes sense in case of visual studio code. You can select something, then do find and replace and it will fill find with selected string while everything is left to put replace string. Maybe we should do it as well...

On Wed, 19 Sep 2018, 23:10 Oliver Buchtala, notifications@github.com wrote:

Sublime is always putting focus into find.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/substance/texture/issues/902#issuecomment-422941497, or mute the thread https://github.com/notifications/unsubscribe-auth/AALG-uOB-AWOCNMAG1sGhrWTJN9qK3GVks5ucqSrgaJpZM4Ww32L .

obuchtala commented 6 years ago

Ah, ok. I didn't see this. So if you open the dialog for replace with a selection, it pre-populates the find input and let's you enter the replace input. I feel, that it does not make so much sense without the initial selection, though.

obuchtala commented 6 years ago

Changed the description according to the above discussion.

obuchtala commented 6 years ago

@Integral if you want, I leave this one to you. :) (but lo-prio)