Menu

#63 indenting bug when trim trailing space is on

open-fixed
Editor (89)
5
2006-07-26
2003-08-13
Anonymous
No

I'm using Syn 2.1.0.40 (and also noticed this with an
older version). Not sure how I can explain this
properly, but here goes.

When trim trailing spaces is on, and you hit backspace
on a line that only has whitespace characters, it will
delete any indenting and go right back to the beginning
of the line instead of unindenting to the previous tab
position.

To duplicate this, turn on Trim Trailing Spaces, then
enter this, where [TAB] is hitting the TAB key and
[BACKSPACE] is the backspace key

test
[TAB]test2
[TAB][TAB]test3
[TAB][TAB][TAB][BACKSPACE]

After hitting that BACKSPACE, the cursor will be at the
beginning of the line instead of being at the column
where test3 starts.

A solution to this may be that triming of trailling
spaces only happens when the file is saved?

Discussion

  • Ascher Stefan

    Ascher Stefan - 2003-08-13

    Logged In: YES
    user_id=163640

    Have you also tried 2.1.0.41? I did some fixes there.

     
  • Nobody/Anonymous

    Logged In: NO

    I can confirm this bug using 2.1.0.45

    When 'trim trailing spaces' and 'want tabs' are on, and you
    press backspace, instead of deleting just the previous tab,
    it seems to delete more than one tab's space.

    To duplicate this, turn on trim trailing spaces. Make sure
    that Want Tabs is also on.

    Type in:

    [tab][tab][tab]test1

    Press enter, and you'll be indented again

    [tab][tab][tab]test1
    [tab][tab][tab]

    Now press backspace. Instead of deleting just the rightmost
    tab, it deletes more than that:

    [tab][tab][tab]test1
    [small gap]

    The 'small gap' is less than two tab's space, but usually
    more than one tab's space.

    This bug does not occur when 'trim trailing spaces' is off.

    My email address: brent22@eatmorespuds.com
    Feel free to contact me for more information.

     
  • Danail Traichev

    Danail Traichev - 2004-02-29

    Logged In: YES
    user_id=466678

    Looks like this is a bug in the TSynEdit component (editor
    component that we use in syn). I have checked it with latest
    SynEdit sources - it happens there. Please report it to
    their bug tracker. SynEdit project homepage is
    http://synedit.sourceforge.net.

     
  • Nobody/Anonymous

    Logged In: NO

    the "trim trailing spaces" option causes weird behavior with
    tabbing. deselecting it solved the problems i was having.

    one thing i noticed with "trim trailing spaces" on was that the
    first tab from a new line will only tab out 3 spaces (with tab
    size set to 4). the next tab would move out 1 space to
    column 4, and all tabs succeeding that would then tab
    correctly with a width of 4 chars.

     
  • Nobody/Anonymous

    Logged In: NO

    the "trim trailing spaces" option causes weird behavior with
    tabbing. deselecting it solved the problems i was having.

    one thing i noticed with "trim trailing spaces" on was that the
    first tab from a new line will only tab out 3 spaces (with tab
    size set to 4). the next tab would move out 1 space to
    column 4, and all tabs succeeding that would then tab
    correctly with a width of 4 chars.

     
  • Paul Gardner

    Paul Gardner - 2006-07-26

    Logged In: YES
    user_id=88638

    Fixed in CVS

     
  • Paul Gardner

    Paul Gardner - 2006-07-26
    • assigned_to: nobody --> paulggardner
    • status: open --> open-fixed
     
  • Paul Gardner

    Paul Gardner - 2006-07-26

    Logged In: YES
    user_id=88638

    This was fixed by the upgrade to SynEdit v2

     

Log in to post a comment.