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

Fix wrong line number in interpreter errors #1520

Merged
merged 1 commit into from Jan 30, 2019

Conversation

galaunay
Copy link
Collaborator

PR Summary

Follow #1505.

Sending region of code with Elpy confuses the interpreter, that displays wrong line numbers when error are raised or when using pdb.

Replacing the function extracting region of codes in Elpy (elpy-shell--region-without-indentation) with a function from python.el (python-shell-buffer-substring) fixes this issue.

PR checklist

Please make sure that the following things have been addressed (and check the relevant checkboxes):

  • Commits respect our guidelines
  • Tests are passing properly (see here on how to run Elpy's tests)

Replace `elpy-shell--region-without-indentation` with the function
`python-shell-buffer-substring` from python.el.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 85.574% when pulling 0ab7f48 on galaunay:Fix-1505 into 8cc0bb8 on jorgenschaefer:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage remained the same at 85.574% when pulling 0ab7f48 on galaunay:Fix-1505 into 8cc0bb8 on jorgenschaefer:master.

@gopar
Copy link
Collaborator

gopar commented Jan 14, 2019

LGTM

@galaunay galaunay merged commit 8130d5e into jorgenschaefer:master Jan 30, 2019
@galaunay galaunay deleted the Fix-1505 branch January 30, 2019 18:11
galaunay added a commit to galaunay/elpy that referenced this pull request Jan 30, 2019
…r#1520)

Replace `elpy-shell--region-without-indentation` with the function
`python-shell-buffer-substring` from python.el.
@galaunay galaunay mentioned this pull request Feb 16, 2019
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants