spyder-ide/spyder

Spyder line wrapping doesn't follow indentation

Opened this issue · 1 comments

Issue Report Checklist

  • Searched the issues page for similar reports
  • Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
  • Reproduced the issue after updating with conda update spyder (or pip, if not using Anaconda)
  • Could not reproduce inside jupyter qtconsole (if console-related)
  • Tried basic troubleshooting (if a bug/error)
    • Restarted Spyder
    • Reset preferences with spyder --reset
    • Reinstalled the latest version of Anaconda
    • Tried the other applicable steps from the Troubleshooting Guide
  • Completed the Problem Description, Steps to Reproduce and Version sections below

Problem Description

Line wrapping in spyder does not follow indentation. Text is wrapped but appears from the beginning of the next line instead of appearing from indentation of the above line. If I turn on indent guides, this wrapped text and the guides intersect each other.

See how the code gets wrapped in if statement
code-wrap

Comment wrapping
comment-wrap

Url wrapping (continuous text)
url-wrap-indent-guide

I was surprised to see that this wrapping behaviour hasn't been noticed by anybody else. Does nobody else prefer using line wrapping?

I have checked this on spyder installations on other Windows devices also. This issue is not specific to my device. I also found the same issue in spyder 5.0

I use Spyder a lot. Please resolve this. TIA.

What steps reproduce the problem?

  1. Preferences>Editor>Wrap lines
  2. Preferences>Editor>Show indent guides

What is the expected output? What do you see instead?

Same file opened in VS Code has the right wrapping behaviour

url-wrap-vscode

Versions

  • Spyder version: 4.0.1
  • Python version: 3.7.6
  • Qt version: 5.9.6
  • PyQt version: 5.9.2
  • Operating System name/version: Windows 10

Dependencies

atomicwrites >=1.2.0         :  1.3.0 (OK)
chardet >=2.0.0              :  3.0.4 (OK)
cloudpickle >=0.5.0          :  1.3.0 (OK)
diff_match_patch >=20181111  :  20181111 (OK)
intervaltree                 :  None (OK)
IPython >=4.0                :  7.12.0 (OK)
jedi =0.14.1                 :  0.14.1 (OK)
nbconvert >=4.0              :  5.6.1 (OK)
numpydoc >=0.6.0             :  0.9.2 (OK)
pexpect >=4.4.0              :  4.8.0 (OK)
pickleshare >=0.4            :  0.7.5 (OK)
psutil >=0.3                 :  5.6.7 (OK)
pygments >=2.0               :  2.5.2 (OK)
pylint >=0.25                :  2.4.4 (OK)
pyls >=0.31.2;<0.32.0        :  0.31.7 (OK)
zmq >=17                     :  18.1.1 (OK)
qdarkstyle >=2.7             :  2.8 (OK)
qtawesome >=0.5.7            :  0.6.1 (OK)
qtconsole >=4.6.0            :  4.6.0 (OK)
qtpy >=1.5.0                 :  1.9.0 (OK)
rtree >=0.8.3                :  0.9.3 (OK)
sphinx >=0.6.6               :  2.4.0 (OK)
spyder_kernels >=1.8.1;<2.0.0:  1.8.1 (OK)
watchdog                     :  None (OK)
cython >=0.21                :  0.29.15 (OK)
matplotlib >=2.0.0           :  3.1.3 (OK)
numpy >=1.7                  :  1.19.5 (OK)
pandas >=0.13.1              :  1.0.1 (OK)
scipy >=0.17.0               :  1.4.1 (OK)
sympy >=0.7.3                :  1.5.1 (OK)

Hi @deepwithin,

This is an issue that we need to fix for one of our future versions of Spyder. Right now we are working on stabilizing Spyder 5 so this will not be in our high priority for a couple of months. If you want to see this issue fixed in the next release please consider to contribute to the project, we can give you all the guidance you need.

Thanks for reporting!