Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/public/js/actions/pause.js b/public/js/actions/pause.js
- index edb7e25..dbb8649 100644
- --- a/public/js/actions/pause.js
- +++ b/public/js/actions/pause.js
- @@ -20,7 +20,12 @@ function resumed() {
- */
- function paused(pauseInfo) {
- return ({ dispatch, getState, threadClient }) => {
- - dispatch(selectSource(pauseInfo.frame.location.sourceId));
- +
- + const location = pauseInfo.frame.location;
- + dispatch(selectSource(location.sourceId, {
- + line: location.line
- + }));
- +
- dispatch({
- type: constants.PAUSED,
- pauseInfo: pauseInfo
- diff --git a/public/js/components/Editor.js b/public/js/components/Editor.js
- index 8acfa98..35f882d 100644
- --- a/public/js/components/Editor.js
- +++ b/public/js/components/Editor.js
- @@ -28,8 +28,7 @@ const Editor = React.createClass({
- selectedSourceOpts: PropTypes.object,
- sourceText: PropTypes.object,
- addBreakpoint: PropTypes.func,
- - removeBreakpoint: PropTypes.func,
- - pause: PropTypes.object
- + removeBreakpoint: PropTypes.func
- },
- componentDidMount() {
- @@ -100,12 +99,6 @@ const Editor = React.createClass({
- this.setSourceText(nextProps.sourceText, this.props.sourceText);
- }
- - let pause = this.props.pause;
- -
- - if (pause) {
- - this.clearDebugLine(pause.getIn(["frame", "location", "line"]));
- - }
- -
- if (this.props.selectedSourceOpts &&
- this.props.selectedSourceOpts.get("line")) {
- this.clearDebugLine(this.props.selectedSourceOpts.get("line"));
- @@ -114,9 +107,6 @@ const Editor = React.createClass({
- if (nextProps.selectedSourceOpts &&
- nextProps.selectedSourceOpts.get("line")) {
- this.setDebugLine(nextProps.selectedSourceOpts.get("line"));
- - } else if (nextProps.pause &&
- - !nextProps.pause.get("isInterrupted")) {
- - this.setDebugLine(nextProps.pause.getIn(["frame", "location", "line"]));
- }
- },
- @@ -152,8 +142,7 @@ module.exports = connect(
- selectedSource: selectedSource,
- selectedSourceOpts: getSelectedSourceOpts(state),
- sourceText: getSourceText(state, selectedId),
- - breakpoints: getBreakpointsForSource(state, selectedId),
- - pause: getPause(state)
- + breakpoints: getBreakpointsForSource(state, selectedId)
- };
- },
- dispatch => bindActionCreators(actions, dispatch)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement