I have a Text Area that is receiving lines of text with an extra two EndofLine comments after to make a nice space between each line.
Everything is fine until you go back up in the TextArea and insert the cursor between two lines and hit return twice and insert the next line.
Now, it starts accumulating empty lines at the end of the TextArea. The more line you go up and edit, you always get two extra blank ones at the bottom. It start to add up.
[quote=213540:@Niles Mitchell]I have a Text Area that is receiving lines of text with an extra two EndofLine comments after to make a nice space between each line.
Everything is fine until you go back up in the TextArea and insert the cursor between two lines and hit return twice and insert the next line.
Now, it starts accumulating empty lines at the end of the TextArea. The more line you go up and edit, you always get two extra blank ones at the bottom. It start to add up.
Anyone know how to prevent this from happening?[/quote]
Mac ? Windows ? Linux ? Got a sample project you can post ?
SelText is replacing the selected text in the text area. As you are just placing the cursor there is no text to replace, so it’s inserted. AppendText adds to the end of the text area. So what you’re getting is what you’re asking for. Change the two AppendTexts to SelText & you’ll get what you want.
I just assumed that the OP wanted to start inserting at the cursor point with his two empty lines for spacing. If he want’s to continue to insert at the end then he needs to change the seltext to a appendtext
I do, Wayne. It’s just that I’m getting 2 blank lines when I do that, not one. If I place the cursor right above a line of text and feed the line in, I wind up with 2 blank lines. This only occurs when I’m inserting in-between existing lines. If It just one after another and I never edit, everything is fine with 1 blank line.