Skip to content

Commit

Permalink
fix(core): cut cell bug when multiple selection
Browse files Browse the repository at this point in the history
  • Loading branch information
sunshinesmilelk committed Jun 20, 2024
1 parent 9ca6b52 commit e0e9e72
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 3 deletions.
33 changes: 33 additions & 0 deletions .changeset/gold-beers-smoke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
"@difizen/libro-core": patch
"@difizen/libro-docs": patch
"@difizen/libro-code-cell": patch
"@difizen/libro-code-editor": patch
"@difizen/libro-codemirror": patch
"@difizen/libro-cofine-editor": patch
"@difizen/libro-cofine-editor-contribution": patch
"@difizen/libro-cofine-editor-core": patch
"@difizen/libro-cofine-textmate": patch
"@difizen/libro-common": patch
"@difizen/libro-jupyter": patch
"@difizen/libro-kernel": patch
"@difizen/libro-l10n": patch
"@difizen/libro-lab": patch
"@difizen/libro-language-client": patch
"@difizen/libro-lsp": patch
"@difizen/libro-markdown": patch
"@difizen/libro-markdown-cell": patch
"@difizen/libro-output": patch
"@difizen/libro-prompt-cell": patch
"@difizen/libro-raw-cell": patch
"@difizen/libro-rendermime": patch
"@difizen/libro-search": patch
"@difizen/libro-search-code-cell": patch
"@difizen/libro-shared-model": patch
"@difizen/libro-terminal": patch
"@difizen/libro-toc": patch
"@difizen/libro-virtualized": patch
"@difizen/libro-widget": patch
---

fix: cut cell bug when multiple selection
4 changes: 1 addition & 3 deletions packages/libro-core/src/libro-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -793,9 +793,7 @@ export class LibroView extends BaseView implements NotebookView {
};
copy2clipboard(JSON.stringify(clipboard));
this.clipboard = clipboard;
for (const cutCell of this.model.selections) {
this.deleteCell(cutCell);
}
this.deleteCell(cell);
} else {
const clipboard: ClipboardType = {
action: 'cut',
Expand Down

0 comments on commit e0e9e72

Please sign in to comment.