#4 Dedent broken


I've noticed that dedent seems broken for mult-line selections. I'm attaching a python file with som indentation structure. All tabs.

You can see the indentation is wrong from 3 to 21 inclusive. As if to fix, select from the beginning of line 3 to the end of line 21. Use the Edit->Indentation->Dedent. Notice that dedenting stops after line 13. Lines 14-21 remain at their previous indentation.


  • Stephen Anderson

    Follow instructions in post to replicate bug

  • Daniel Pozmanter

    Logged In: YES

    Thanks for the report. Here is what I found:
    DrPython could not handle dedent with mac line endings.
    I fixed this.

    However this alone was not your problem.
    Your file is mixed! It was not consistant in its use of
    file endings.
    Drpython now automatically checks for consistency in file
    and warns the user (if check line ending is enabled in

    I need to add a way to do this from the edit menu.

    The changes made thus far have been uploaded to cvs.

  • Daniel Pozmanter

    • status: open --> pending-accepted
  • Stephen Anderson

    • status: pending-accepted --> open-accepted
  • Stephen Anderson

    Logged In: YES

    Thanks for the reply! I will probably file another bug on the mixed line endings as soon as I track down a good simple test case. Early on when I started this file DrPython and UltraEdit struggled over this file. Both would claim it was in Unix format and request to change it to Dos format. When either did, the file looked screwed up in the other. I'm not sure which program started the problem, but I'm going to find out.


  • Stephen Anderson

    Logged In: YES

    Oops! I only meant to add a coment, not change the status/resolution. My bad!

  • Stephen Anderson

    • status: open-accepted --> closed
  • Daniel Pozmanter

    Logged In: YES

    :) No need to file the line ending bug, I am already well
    aware of it.

    Try using the cvs version. Does that erase the problem?

    Try creating a file with blank and filled lines in both
    ultraedit and drpython. What is happening?

    Try writing a small python script like:

    f = file("/home/user/bug.py", 'r')
    text = f.read()

    x = 0
    l = len(text)
    while x < l:
    if x == '\r':
    print "<CR>"
    elif x == '\n':
    print "<N>
    x = x + 1



Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks