mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-11-16 20:45:33 -08:00
Seed new notepad tabs with their name as a heading and focus under it, show Learning switch on/off as working right away, and stop the Tauri window from taking file drops
AI Assisted
This commit is contained in:
1 parent
bb5bd5986d
commit
1516b25ea3
10 files changed
+75
-7
No files matched your search
@@ -226,7 +226,14 @@ export function makeCodeMirrorEditor(parent, { onChange, label }) {
|
||||
readOnly = Boolean(on);
|
||||
view.dispatch({ effects: access.reconfigure(accessOf(readOnly)) });
|
||||
},
|
||||
focus: () => view.focus(),
|
||||
// `at`, when given, is the caret's offset in the text.
|
||||
focus(at) {
|
||||
if (Number.isInteger(at)) {
|
||||
const pos = Math.min(Math.max(at, 0), view.state.doc.length);
|
||||
view.dispatch({ selection: { anchor: pos }, scrollIntoView: true });
|
||||
}
|
||||
view.focus();
|
||||
},
|
||||
destroy() {
|
||||
view.destroy();
|
||||
host.remove();
|
||||
|
||||
Reference in new issue
Block a user