Fixed an issue where debugger was not scrolling automatically on stepping. #7275

This commit is contained in:
Aditya Toshniwal 2024-04-16 15:33:42 +05:30
parent 0546e79aed
commit 29ccdb3242
2 changed files with 4 additions and 2 deletions

View File

@ -32,5 +32,6 @@ Housekeeping
Bug fixes
*********
| `Issue #7275 <https://github.com/pgadmin-org/pgadmin4/issues/7275>`_ - Fixed an issue where debugger was not scrolling automatically on stepping.
| `Issue #7282 <https://github.com/pgadmin-org/pgadmin4/issues/7282>`_ - Fixed an XSS vulnerability in the /settings/store endpoint.
| `Issue #7294 <https://github.com/pgadmin-org/pgadmin4/issues/7294>`_ - Fixed an issue where double dollar quoted code is treated as string in syntax highlighter.

View File

@ -216,7 +216,7 @@ export default class CustomEditorView extends EditorView {
pos = line.to;
}
}
this.dispatch({ selection: { anchor: pos, head: pos } });
this.dispatch({ selection: { anchor: pos, head: pos }, scrollIntoView: true});
}
getCurrentLineNo() {
@ -311,6 +311,7 @@ export default class CustomEditorView extends EditorView {
}
setActiveLine(line) {
this.dispatch({ effects: activeLineEffect.of({ from: line, to: line }) });
let scrollEffect = line >= 0 ? [EditorView.scrollIntoView(this.state.doc.line(line).from, {y: 'center'})] : [];
this.dispatch({ effects: [activeLineEffect.of({ from: line, to: line })].concat(scrollEffect) });
}
}