Files
orca/src/shared/editor-save-settings.ts
T
0a1e420212 feat(editor): add Insert Final Newline on save (#37786)
* feat(editor): insert final newline on save

Based on the community contribution in #33567 by @johnie.

Co-authored-by: Johnie Hjelm <864992+johnie@users.noreply.github.com>

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* chore: credit community final-newline contribution

Co-authored-by: Johnie Hjelm <864992+johnie@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix(editor): exclude CSV previews from clean saves

Restore the final-newline setting imports after the upstream settings refactor.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix(editor): skip unnecessary clean saves

Only run the final-newline clean-save fallback when text needs a newline, while preserving empty and terminated drafts.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix(editor): preserve pending edits on keyboard save

Use current tab state and retain loaded fallback text when pending edits have not produced a draft yet.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Johnie Hjelm <864992+johnie@users.noreply.github.com>
2026-11-03 12:53:26 -08:00

5 lines
105 B
TypeScript

export type EditorSaveSettings = {
editorFormatOnSave?: boolean
editorInsertFinalNewline?: boolean
}