- note_editor: persist font size to SharedPreferences on change and
restore it on load
- note_list: add :fav (toggle favorites filter), :sub (toggle
subdirectory search), :content (toggle file content search) commands
- texts: document new commands in help content
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Removes the unreliable viewport-centre cursor heuristic. Switching to
edit mode now always positions the cursor at text.length and scrolls to
the bottom, whether arriving from a regular tap or a long-press. The
long-press scroll-to-end on initial load (view mode) is unchanged.
Cleans up _cursorAtEnd flag, _editorKey / GlobalKey, _getOffsetAtViewportCenter,
and the public WrappedCodeFieldState / findRenderEditable that were only
needed for the removed feature.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Long-pressing a note in the list opens it in view mode with the scroll
position at the bottom of the file. Switching to edit mode the first
time positions the cursor at the end of the text and scrolls there too,
so the user can immediately append content.
Implementation:
- NoteEditorScreen gains a scrollToEnd parameter (default false)
- A ScrollController is attached to the view/edit SingleChildScrollView
- After content loads with scrollToEnd=true, two post-frame callbacks
fire (first renders the content, second has a stable maxScrollExtent)
then jumpTo(maxScrollExtent)
- _cursorAtEnd flag is consumed on the first Mode Edit switch: sets
selection to text.length, requests focus, and scrolls to bottom
- NoteListScreen ListTile gets onLongPress that navigates with
scrollToEnd: true and reloads on return
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Introduce NoteMode enum { view, edit, preview } replacing the old bool
- Default mode when opening a note is view (syntax-highlighted, read-only)
- Menu now shows all three modes with a checkmark on the active one
- Save and autosave menu items disabled outside edit mode
- New notes open in edit mode with cursor positioned after the header
and keyboard focused, ready to type
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>