Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
f7ad067
Davidkutu/ds interactive window focus fix (#9895)
Feb 4, 2020
15d40c4
Fix variables on mac and linux (#9897) (#9903)
rchiodo Feb 4, 2020
20e5ee2
Fix focusing of cells when navigating cells using up/down arrow (#988…
DonJayamanne Feb 5, 2020
d2b3f15
Disable webHostNotebook experiment and fix name of exp (#9894) (#9907)
DonJayamanne Feb 5, 2020
9f5ac3f
Davidkutu/ds scrapbook render fix (#9912)
Feb 5, 2020
8d7636e
Disable the terminal activation experiment (#9937)
DonJayamanne Feb 6, 2020
8805276
Notebook should use kernel from metadata (#9936)
DonJayamanne Feb 6, 2020
d022524
Port server cache fix to release (#9932)
IanMatthewHuff Feb 6, 2020
ed09569
Port variable restart fix (#9938)
rchiodo Feb 6, 2020
415cab4
Do not override kernels info in other notebooks (#9958)
DonJayamanne Feb 6, 2020
abb5d14
Disables the use of a terminal to activate an environment (#9967)
DonJayamanne Feb 7, 2020
3976296
Port server name fix to release (#9970)
IanMatthewHuff Feb 7, 2020
4946e5c
When starting Jupyter activate conda env (#9972)
DonJayamanne Feb 7, 2020
3be03b0
Porting K8 fix to release (#9987)
IanMatthewHuff Feb 7, 2020
36fee5c
Update version and changelog date for release (#10022)
karthiknadig Feb 10, 2020
7a26421
Ignore FS errors from stat() in some cases. (#10032)
Feb 10, 2020
f2d788c
Update chang log (#10041)
karthiknadig Feb 11, 2020
ffbe5e1
Install jupyter instead of installing kernel spec (#10080) (#10083)
DonJayamanne Feb 12, 2020
c8895be
Fix for zh-tw loading issue. (#10085) (#10089)
karthiknadig Feb 12, 2020
5066319
Update version and changelog for point release. (#10091)
karthiknadig Feb 12, 2020
dcc695c
Port fixes for second point release. (#10146)
rchiodo Feb 18, 2020
933101a
Cherry pick more fixes for feb point2 (#10183)
DonJayamanne Feb 18, 2020
ea89876
fix SVG mimetype name (#10181) (#10185)
IanMatthewHuff Feb 18, 2020
7a01a9a
Update change log
DonJayamanne Feb 19, 2020
71642d3
Some more ds telemetry (#10218)
DonJayamanne Feb 19, 2020
a3f0932
Update date in change log
DonJayamanne Feb 19, 2020
4dc2d43
Merge branch 'release-2020.02' of github.com:microsoft/vscode-python …
DonJayamanne Feb 19, 2020
9bcce5e
Point release with fix for Issue 10250 (#10254)
DonJayamanne Feb 21, 2020
a90813a
merging into master
karthiknadig Feb 21, 2020
3059c18
Clean up
karthiknadig Feb 21, 2020
78ead84
More clean up
karthiknadig Feb 21, 2020
1b50305
Some more text fixes
karthiknadig Feb 21, 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 focusing of cells when navigating cells using up/down arrow (#9885)…
… (#9908)

For #9884
  • Loading branch information
DonJayamanne authored Feb 5, 2020
commit 20e5ee25e1ae00d309293633366b1308b06e4eb6
14 changes: 10 additions & 4 deletions src/datascience-ui/native-editor/redux/reducers/effects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,18 @@ export namespace Effects {
return arg.prevState;
}

export function selectCell(arg: NativeEditorReducerArg<ICellAndCursorAction>): IMainState {
/**
* Select a cell.
*
* @param {boolean} [shouldFocusCell] If provided, then will control the focus behavior of the cell. (defaults to focus state of previously selected cell).
*/
export function selectCell(arg: NativeEditorReducerArg<ICellAndCursorAction>, shouldFocusCell?: boolean): IMainState {
// Skip doing anything if already selected.
if (arg.payload.cellId !== arg.prevState.selectedCellId) {
let prevState = arg.prevState;
const addIndex = prevState.cellVMs.findIndex(c => c.cell.id === arg.payload.cellId);

const anotherCellWasFocusedAndSelected = typeof prevState.focusedCellId === 'string' && prevState.focusedCellId === prevState.selectedCellId;
const shouldSetFocusToCell = typeof shouldFocusCell === 'boolean' ? shouldFocusCell : anotherCellWasFocusedAndSelected;
// First find the old focused cell and unfocus it
let removeFocusIndex = arg.prevState.cellVMs.findIndex(c => c.cell.id === arg.prevState.focusedCellId);
if (removeFocusIndex < 0) {
Expand All @@ -149,7 +155,7 @@ export namespace Effects {
if (addIndex >= 0 && arg.payload.cellId !== prevState.selectedCellId) {
newVMs[addIndex] = {
...newVMs[addIndex],
focused: prevState.focusedCellId !== undefined && prevState.focusedCellId === prevState.selectedCellId,
focused: shouldSetFocusToCell,
selected: true,
cursorPos: arg.payload.cursorPos
};
Expand All @@ -158,7 +164,7 @@ export namespace Effects {
return {
...prevState,
cellVMs: newVMs,
focusedCellId: prevState.focusedCellId !== undefined ? arg.payload.cellId : undefined,
focusedCellId: shouldSetFocusToCell ? arg.payload.cellId : undefined,
selectedCellId: arg.payload.cellId
};
}
Expand Down
23 changes: 13 additions & 10 deletions src/datascience-ui/native-editor/redux/reducers/execution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,20 @@ export namespace Execution {
case 'select':
// Select the cell below this one, but don't focus it
if (index < arg.prevState.cellVMs.length - 1) {
return Effects.selectCell({
...arg,
prevState: {
...executeResult
return Effects.selectCell(
{
...arg,
prevState: {
...executeResult
},
payload: {
...arg.payload,
cellId: arg.prevState.cellVMs[index + 1].cell.id,
cursorPos: CursorPos.Current
}
},
payload: {
...arg.payload,
cellId: arg.prevState.cellVMs[index + 1].cell.id,
cursorPos: CursorPos.Current
}
});
false
);
}
return executeResult;

Expand Down