fix: use fullText setter — content from previous file no longer leaks
Stefan reported that opening a flow (hello) sometimes showed content from a different flow (extract-with-approval). Cause: flutter_code_editor's CodeController distinguishes between `text` (the visible buffer, post-fold) and `fullText` (the underlying source). Setting `_code.text = newFile` only updates the visible buffer; the underlying `_code` data structure retains the previous file's source, so subsequent folding/scrolling can surface its content. Switch all three load sites + the save site to the canonical setter: Before _code.text = text (visible buffer only) After _code.fullText = text (replaces underlying source) Save also moves to writing `_code.fullText` so any text the operator collapsed behind a fold survives the round-trip. Verified against flutter_code_editor 0.3.5 source — the fullText setter calls `_updateCodeIfChanged` then re-emits `TextEditingValue(text: _code.visibleText)`, which is the documented "fully reset the editor" path. Bump version 0.1.1 → 0.1.2. Studio's pubspec already pins `ref: main` so the next `flutter pub upgrade` picks it up. Signed-off-by: flemming-it <sf@flemming.it>
This commit is contained in:
parent
8b918f8f2a
commit
7655e0dc32
2 changed files with 8 additions and 5 deletions
|
|
@ -1,6 +1,6 @@
|
|||
name: fai_studio_flow_editor
|
||||
description: Swappable inline YAML editor for F∆I Studio flows.
|
||||
version: 0.1.1
|
||||
version: 0.1.2
|
||||
publish_to: 'none'
|
||||
repository: https://git.flemming.ai/fai/studio-flow-editor
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue