Menu

#365 49810: White space indent on empty lines

open
nobody
None
5
2012-09-26
2004-07-17
No

When editor set to remove white space and to autoindent
with space, a new line will be automatically indented
with a number of space. However, if the line is left,
the indent spaces will remain on the line, despite the
'Keep trailing spaces' flag not being set.

Result becomes:
....function();
....
....function();

The second line about should have been empty.

Discussion

  • Per Westermark

    Per Westermark - 2004-07-17

    Logged In: YES
    user_id=295692

    This problem - and a lot of other - with white space removal
    would be solved with the editor doesn't try to hunt white
    space when editing a line but instead wait until the cursor
    leaves the line - or just before file save for the current
    line (if line changed?) - before removing tailing whitespace.

    This would for example also solve the problem where
    multi-line comments are re-wrapped by moving to end of line,
    inserting a space, pressing Ctrl+Shift+Right, and pressing
    delete would give same result as if re-wrapping was done
    with moving, pressing Ctrl+Shift+Right and then pressing space.

    Also, since the white space removal would be made by the
    application and not the synedit control (?) it would
    probably solve 992830 by making sure that Undo can restore
    the whitespace.

     
  • Marek Januszewski

    Logged In: YES
    user_id=609236

    fixed in cvs. test build:
    http://www.castlesofpoland.com/dev-cpp/devcpp.exe . Please
    reopen this bug report if the fix doesn't work for you and
    provide some explanation what's happening

     
  • Per Westermark

    Per Westermark - 2005-06-08

    Logged In: YES
    user_id=295692

    Problem is still exists in 4.9.9.2 and 4.9.8.10.

    Indent creates empty indented lines.
    If a space is pressed on the indented line, then it gets
    "cleaned" and the indent spaces gets removed.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.