Issue: I delete some chars at the end of a tab-del txt file. Then after save, IDEA removes some line chars and tabs?

This is some very odd behavior I'm noticing and not sure what is causing it. It's best illutrated by some screen shots that I've attached.

picture 1: you'll see a txt file of tab delimted columns.

picture 2: I go ahead and delete the last 0 in lines 3,4,and 5.

now I hit "save"

picture 3: Notice what happened after hitting save.... lines 3 and 4 now have an entired tab and 0 removed from the end of the line! (line 5 remained fine, it was just the preceding lines had the entire 0 and tab and deleted.)

I'm not sure what is causing this?



Attachment(s):
Picture 3.jpg
Picture 2.jpg
Picture 1.jpg
3 comments
Comment actions Permalink

My guess would be on this "Settings -> Editor -> Strip trailing spaces on Save" (lower left of the pane)

Rick wrote:

This is some very odd behavior I'm noticing and not sure what is causing it. It's best illutrated by some screen shots that I've attached.

picture 1: you'll see a txt file of tab delimted columns.

picture 2: I go ahead and delete the last 0 in lines 3,4,and 5.

now I hit "save"

picture 3: Notice what happened after hitting save.... lines 3 and 4 now have an entired tab and 0 removed from the end of the line! (line 5 remained fine, it was just the preceding lines had the entire 0 and tab and deleted.)

I'm not sure what is causing this?

---
Original message URL: http://www.jetbrains.net/devnet/message/5238389#5238389


------------------------------------------------------------------------


------------------------------------------------------------------------


------------------------------------------------------------------------

0
Comment actions Permalink

....possibly combined with newlines that are inconsistent throughout the file,
or that don't match what IDEA thinks they are for that file (eg \n vs \r\n)
which might explain why you're losing the zero characters too.

My guess would be on this "Settings -> Editor -> Strip trailing spaces
on Save" (lower left of the pane)

Rick wrote:

>> This is some very odd behavior I'm noticing and not sure what is
>> causing it. It's best illutrated by some screen shots that I've
>> attached.
>>
>> picture 1: you'll see a txt file of tab delimted columns.
>>
>> picture 2: I go ahead and delete the last 0 in lines 3,4,and 5.
>>
>> now I hit "save"
>>
>> picture 3: Notice what happened after hitting save.... lines 3 and 4
>> now have an entired tab and 0 removed from the end of the line! (line
>> 5 remained fine, it was just the preceding lines had the entire 0 and
>> tab and deleted.)
>>
>> I'm not sure what is causing this?
>>
>> ---
>> Original message URL:
>> http://www.jetbrains.net/devnet/message/5238389#5238389
>> -


>> ---
>>
>> -


>> ---
>>
>> -


>> ---
>>



0
Comment actions Permalink

Thanks, "strip trailing spaces" was the culprit, yet, I still think it's a bug since the previous lines still have a tab than a character.... yet both the char and the tab are being stripped, so it's stripping more than just trailing spaces.

0

Please sign in to leave a comment.