Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
8f1fd7b
refactored ICellRange definition to type.ts since it's now used acros…
Jun 19, 2020
fd5e865
add command insertCellBelowPosition
Jun 20, 2020
127e2df
add command insertCellBelow
Jun 20, 2020
38fad86
add command insertCellAbove
Jun 20, 2020
5afe4cc
add deleteCells command
Jun 21, 2020
dd846c1
add selectCell command
Jun 21, 2020
cfeccbb
add selectCellContents command
Jun 21, 2020
500fe5a
modify selectCell to maintain previous orientation of selection ancho…
Jun 21, 2020
cf5e404
fix detection of anchor and active position direction
Jun 21, 2020
aa39444
add extendSelectionByCellAbove
Jun 21, 2020
9a073aa
add extendSelectionByCellBelow
Jun 22, 2020
4a95409
add moveCellsUp
Jun 23, 2020
95fc70d
add moveCellsDown
Jun 23, 2020
cc37494
added news file for enhancement changes being added
Jun 24, 2020
1f73555
add changeCellToMarkdown
Jun 28, 2020
e62137a
add changeCellToCode
Jul 10, 2020
f624692
Remove cell edit commands from context menu
Jul 10, 2020
9a17d5f
Use the insertCell method to insert a cell when RunCellAndAdvance rea…
Jul 10, 2020
0ae48a6
Use the insertCell method to insert cell within addEmptyCellToBottom
Jul 10, 2020
8842cde
Add telemetry for cell edit commands in interactive python
Jul 10, 2020
8d1ae3f
Add codeLensFactory.getCodeLensCacheData and abstracted the cell rang…
Jul 10, 2020
db47d3a
clean up async and promises within codewatcher.ts
Jul 13, 2020
4fdd64c
clean up unnecessary Promise.resolve()
Jul 14, 2020
9876718
refactor unnecessary async functions to sync functions
Jul 31, 2020
0b83e38
added unit tests for move cells down
Jul 31, 2020
6ac5741
Merge branch 'master' into issue-12414-python-interactive-cell-shortcuts
Jul 31, 2020
716200b
change the when for commands to display when the python file has cells
Aug 1, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix detection of anchor and active position direction
  • Loading branch information
earthastronaut
earthastronaut committed Jun 24, 2020
commit cf5e404ad29c7d3e5cfa5ac6982219850bb92c5a
9 changes: 2 additions & 7 deletions src/client/datascience/editor-integration/codewatcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -461,10 +461,7 @@ export class CodeWatcher implements ICodeWatcher {
if (startEndCells) {
const startCell = startEndCells[0];
const endCell = startEndCells[1];
if (
editor.selection.anchor.line <= editor.selection.active.line &&
editor.selection.anchor.character <= editor.selection.active.character
) {
if (editor.selection.anchor.isBeforeOrEqual(editor.selection.active)) {
editor.selection = new Selection(startCell.range.start, endCell.range.end);
} else {
editor.selection = new Selection(endCell.range.end, startCell.range.start);
Expand All @@ -484,9 +481,7 @@ export class CodeWatcher implements ICodeWatcher {
}
const startCellIndex = startEndCellIndex[0];
const endCellIndex = startEndCellIndex[1];
const isAnchorLessEqualActive =
editor.selection.anchor.line <= editor.selection.active.line &&
editor.selection.anchor.character <= editor.selection.anchor.character;
const isAnchorLessEqualActive = editor.selection.anchor.isBeforeOrEqual(editor.selection.active);

const cells = this.codeLensFactory.cells;
const selections: Selection[] = [];
Expand Down