Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#4 Dedent broken

closed
nobody
None
5
2004-02-28
2004-02-27
Stephen Anderson
No

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.

Discussion

  • Follow instructions in post to replicate bug

     
    Attachments
  • Logged In: YES
    user_id=796750

    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
    endings,
    and warns the user (if check line ending is enabled in
    preferences).

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

    The changes made thus far have been uploaded to cvs.

     
    • status: open --> pending-accepted
     
    • status: pending-accepted --> open-accepted
     
  • Logged In: YES
    user_id=53053

    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.

    Thanks!

     
  • Logged In: YES
    user_id=53053

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

     
    • status: open-accepted --> closed
     
  • Logged In: YES
    user_id=796750

    :) 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()
    f.close()

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

    Cheers.