Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR: Add same behaviour for go to previous cell as the one in Matlab #4612

Merged
merged 5 commits into from
Jun 15, 2017

Conversation

dalthviz
Copy link
Member

Fixes #4611

Preview:
cell

@dalthviz dalthviz added this to the v3.2 milestone Jun 15, 2017
@dalthviz dalthviz self-assigned this Jun 15, 2017
@dalthviz dalthviz requested a review from ccordoba12 June 15, 2017 02:40
@ccordoba12
Copy link
Member

Nice! @rlaverde, please take a look at this one.

@liavassif, is this what you want?

@ccordoba12 ccordoba12 changed the title PR: Add same behaviour for goto previous cell as MATLAB. PR: Add same behaviour for go to previous cell as Matlab. Jun 15, 2017
@liavassif
Copy link

@ccordoba12 Yes!
@dalthviz Thanks!

Copy link
Member

@rlaverde rlaverde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't know how "move to the previous cell" works in other IDEs, and added an extra loop to move to the start of the cell (and then to the previous cell), delete this loop was the right thing to do.

while not self.is_cell_separator(cursor):
# Moving to the previous code cell
if self.is_cell_separator(cursor):
# Move to the previous cell
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe explain the behavior in the comment, not always will move to the previous cell: "Move to the previous cell or the beginning of the current cell"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rlaverde I made the change in the comment below this one, it's ok there or should I make the change here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, It's ok, It's even better where you did the change

@ccordoba12 ccordoba12 changed the title PR: Add same behaviour for go to previous cell as Matlab. PR: Add same behaviour for go to previous cell as the one in Matlab Jun 15, 2017
@ccordoba12 ccordoba12 merged commit 4bfaced into spyder-ide:3.x Jun 15, 2017
ccordoba12 added a commit that referenced this pull request Jun 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants