Menu

#106 Pressing "Return" at end of folded tag deletes content

open
None
5
2008-02-08
2008-02-06
Belgabor
No

If I fold a multi-line tag like this

<example>
<sometag/>
<someothertag/>
</example>

XCE shows

<example>

If I now place the cursor at the end of the line as shown here:

<example>|

and press enter, XCE deletes the complete contents of the <example> tag.

What I would expect is XCE keeping the tag folded and placing the cursor after the closing tag =)

If possible an enhanced solution would be to show folded tags like this:
<example>...</example>
With the ... being somewhat grey. If remember correctly, scintilla supports something like this, but might be wrong (I guess you use wxStyledTextControl or wxScintilla?).

Discussion

  • Belgabor

    Belgabor - 2008-02-06

    Logged In: YES
    user_id=573198
    Originator: YES

    Ok, sorry, I was wrong. It just appears deleted. Still what happens is wrong. If you press return, you are basically creating a new line within the folded tag, right after the opening tag. The rest of the tag is not shown, it seems still folded away (despite the bar now showing the unfolded '-' icon). If you fold and unfold it again, it is shown correctly.

     
  • Nobody/Anonymous

    Logged In: NO

    Arrgh! Thanks for spotting this. Will fix ASAP.

    Scintilla has seen some amazing updates over past two years that haven't made it into wxW :-| Still waiting for a fully operational XML lexer too.

    Have looked into writing my own (that's what Altova did when they saw it was slightly broken) but updating wxStyledTextCtrl and getting the lexer into Scintilla distributions would be more than I can find time for right now.

    -Gerald

     
  • gnschmidt

    gnschmidt - 2008-02-08
    • assigned_to: nobody --> gnschmidt
     
  • Belgabor

    Belgabor - 2008-02-09

    Logged In: YES
    user_id=573198
    Originator: YES

    You'd need to go to wx29, it moved wxSTC to main and uses 1.75 (at least in recent svn). Of course using the development version of wx has it's own risks. You could still try if wxSTC drops into 2.8 with few or no modifications.

    What wx version do you use? Current SVN for the 2.8 branch has wxSTC based on 1.70.

     

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.