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

Tabs as indentation - characters being removed in editor #4037

Closed
harryhobson opened this issue Jan 24, 2017 · 9 comments
Closed

Tabs as indentation - characters being removed in editor #4037

harryhobson opened this issue Jan 24, 2017 · 9 comments

Comments

@harryhobson
Copy link

Description

In the main editor, tabbing forward then backward deletes some characters on the same line

What steps will reproduce the problem?

  1. Preferences -> Editor -> Advanced Settings -> 'Indentation Character' = Tabs
  2. create empty python file in spyder
  3. add line # comment
  4. put cursor on added line, tab forward then backward
  5. '# c' gets deleted

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

tab should be added and removed without deleting other characters

Please provide any additional information below

  • more characters are removed if line indented further
  • if I use backspace I get the same behaviour, however if I use the 'delete' key this works fine.
  • attached picture shows indentation settings
    screenshot from 2017-01-24 18-19-42

Version and main components

  • Spyder Version: 3.1.0
  • Python Version: 2.7.13
  • Qt Versions: 5.6.2, PyQt5 5.6 on Linux

Dependencies

pyflakes >=0.5.0 :  1.5.0 (OK)
pep8 >=0.6       :  1.7.0 (OK)
pygments >=2.0   :  2.1.3 (OK)
qtconsole >=4.2.0:  4.2.1 (OK)
nbconvert >=4.0  :  4.2.0 (OK)
pandas >=0.13.1  :  0.19.2 (OK)
numpy >=1.7      :  1.11.3 (OK)
sphinx >=0.6.6   :  1.5.1 (OK)
rope >=0.9.4     :  0.9.4 (OK)
jedi >=0.8.1     :  0.9.0 (OK)
psutil >=0.3     :  5.0.1 (OK)
matplotlib >=1.0 :  1.5.3 (OK)
sympy >=0.7.3    :  1.0 (OK)
pylint >=0.25    :  1.6.4 (OK)

@ccordoba12
Copy link
Member

@rlaverde, please take a look at this one.

@msoultan
Copy link

msoultan commented May 2, 2017

It seems like I have an issue that is somewhat along the lines of the one described in this topic. I just thought I'd mention it as I noticed there was an update scheduled for 3.1.4 but I'm running 3.1.2 - will that update fix my problem as well? Here's how I reproduce this problem:

type the following:

12345
12345

then place cursor in front of 1 on the first line and hit tab. Then down arrow (which should place the cursor at position 1 of line 2), tab, down arrow tab, etc until all numbers are tabbed over. Now place cursor on line 1 at the 1st position and hit tab, down arrow, tab, and you'll end up with this:

        12345
        45

If I start with this:

1
2
3

and then do the same tab down thing like above, when you get to line 2 it deletes the entire line, probably because the four spaces are overwriting the carriage return.

What might also be related to this is if you type the following:

1
2

and do the same tab thing as above (tab, down, tab), then back up and tab, down, tab. You end up with this:

    1
        2

so the indentation is kinda screwy, and that might be what's causing stuff to get overwritten.

@msoultan
Copy link

msoultan commented May 2, 2017

I was finally able to update spyder (I'm relatively new at github and spyder/anaconda) and it looks like the issues I mentioned above are resolved. Sorry about the extra post on a completed issue and I appreciate your help to fix this issue.

@alquires
Copy link

Hi
I have the same problem in Spyder 3.1.4 with Python 2.7.13 (32 bits and 64 bits).

@ccordoba12
Copy link
Member

I think this will be fixed in Spyder 3.2. So please wait until that version is available (hopefully in a couple of days) and try again.

@MillingtonAllen
Copy link

Still having this problem with Spyder 3.3.3

@Tunneller
Copy link

TAB is overwriting text in the version of Spyder that I just downloaded. Very frustrating. Exactly as msoultan described in 2017.

@asyates
Copy link

asyates commented May 1, 2020

same problem with spyder 4.0.1

@ccordoba12
Copy link
Member

@asyates, please open a new issue about this so we can take a look at it again. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants