code
code copied to clipboard
Focus terminal on enter, strip trailing spaces on doc focus out
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).
- Implement focus follow between the terminal and the current document (does this need a setting?)
- Strip trailing spaces from the document when focused out (subject to the setting). Leave whether this change is saved to the AutoSave setting,