Focus terminal on enter, strip trailing spaces on doc focus out#1663
Focus terminal on enter, strip trailing spaces on doc focus out#1663
Conversation
ryonakano
left a comment
There was a problem hiding this comment.
I'm not sure if we should reuse strip-trailing-on-save setting because this is not triggered on save.
|
@ryonakano Maybe we can rename the setting to |
|
Regression found: The selection is lost on focussing out - this is particularly problematic when showing the context menu if you want to apply an action like change case to the selection. Converting to draft. Also possible causing loss of final character (sometimes) This PR is convenient but needs further work. |
Fixes #581
It is considered potentially problematic to strip spaces on autosave so this solution is proposed. Stripping only occurs when the document is unfocused on the assumption that in that case the user is no in mid edit.
It is inconvenient to have to both move and click the pointer to focus the terminal and the same to refocus the document. Also lint errors are often caused by failing to force save the document first (trailing spaces are not stripped during autosave).