Commit 6c3743a4 authored by Igor Slobodskov's avatar Igor Slobodskov Committed by intellij-monorepo-bot
Browse files

[DS-4846] remove selection when selecting single cell

GitOrigin-RevId: 0c12cfa7cb796a3f109d19a54a37235b34a1594e
parent 94f9a4fd
Branches unavailable Tags unavailable
No related merge requests found
Showing with 4 additions and 2 deletions
+4 -2
......@@ -52,8 +52,10 @@ class CaretBasedCellSelectionModel(private val editor: Editor) : NotebookCellSel
// carets merging based on visual position
// can't add another caret "<caret>#%%\n" -> "#%%\n<caret>", in jupyter visual positions are equal (header is hidden).
// so better to move primary caret instead of adding new. See CellBorderTest.`one cell, click on add cell above`
editor.caretModel.primaryCaret.moveToLogicalPosition(cell.startLogicalPosition)
editor.caretModel.removeSecondaryCarets()
val caretModel = editor.caretModel
caretModel.primaryCaret.moveToLogicalPosition(cell.startLogicalPosition)
caretModel.primaryCaret.removeSelection()
caretModel.removeSecondaryCarets()
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment