mirror of
https://github.com/microsoft/vscode.git
synced 2026-08-18 13:17:05 +01:00
* markdown: refactor: use setTaskCheckboxChecked for task toggles The webview hand-rolled the task checkbox source edit: it looked up the list item offset, computed the '[ ]' range and applied a StringEdit itself. That logic now lives in EditorModel.setTaskCheckboxChecked, so delegate to it. This also fixes toggling in read-only mode. The old handler bailed out on model.readonlyMode and then routed through applyEdit, which is itself read-only gated, so clicking a rendered checkbox in read-only mode did nothing. Read-only in this editor means markers hidden and no text editing while selection and copy still work - a rendering and interaction mode rather than a document permission - so setTaskCheckboxChecked deliberately bypasses that gate while applyEdit, applyEditForSelection and materializePendingParagraph stay gated. Requires a @vscode/markdown-editor release containing setTaskCheckboxChecked (microsoft/vscode-packages#253). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e9ec8741-eb31-42f3-9e0c-13e2add8e02d * markdown: chore: update @vscode/markdown-editor to 0.0.2-70 Picks up `EditorModel.setTaskCheckboxChecked`, which the task checkbox handler in `markdown-editor-src/editor.ts` delegates to. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e9ec8741-eb31-42f3-9e0c-13e2add8e02d --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e9ec8741-eb31-42f3-9e0c-13e2add8e02d