-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blank line at end-of-file not displayed #61
Comments
I'm new to xed and I only noticed the bug described above when I discovered that, with one particular file, I couldn't see the last line of text until I started editing. The file is available for examination if requested. |
@e-james would you mind sharing the file just so I can try to reproduce? |
On 19/01/17 08:38, JosephMcc wrote:
@e-james <https://github.com/e-james> would you mind sharing the file just so I can try to reproduce?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#61 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AX-tsuzS2WahYbMGEPXtCpVqEs05NwvTks5rTyD4gaJpZM4LK-zf>.
The file in question is a shell script for compressing video files and the contents are mildly confidential. I have managed to replace the contents while maintaining the anomaly, so I can suggest some things to look at. It seems to be something to do with the number of lines, the length of the lines, the size of the file and maybe remembering the cursor position. The modified file is attached.
|
I don't see the attached file. I'd like to test this against some recent changes. |
On 10/02/17 01:25, JosephMcc wrote:
I don't see the attached file. I'd like to test this against some recent changes.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#61 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AX-tsotW9T9_4dr-QMWaeA0-NWyIFd9rks5ra7ykgaJpZM4LK-zf>.
Github is unfamiliar territory for me. I don't know what works and what doesn't. I would be happy to email the attachment to a different address or upload it to a suitable location on your instructions.
|
On 10/02/17 01:25, JosephMcc wrote:
I don't see the attached file. I'd like to test this against some recent changes.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#61 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AX-tsotW9T9_4dr-QMWaeA0-NWyIFd9rks5ra7ykgaJpZM4LK-zf>.
How about this
XEDBUG.sh ---> XEDBUG.sh.zip
xxd -p XEDBUG.sh.zip > XEDBUG-zip-hex.txt (What I did to produce the hex code below)
504b0304140300000800dc55334a07d341bec30000006032000009000000
5845444255472e7368edd0410bc1600080e1fb7ec570fed8949c1d56d82c
65ceda2eec6029e5f72bb5e4f0de44f23e3fe1190d264ddb4d9afa7a8aa2
d1128078b9ceff8131c6bc300618038c01c600638031c018600c30061803
8c01c600638031c018600c300618038c01c600638031c018600c30061803
8c01c600638031c018600c300618038c01c600638031c018600c30067c32
26f4b659b92faad566516571b12ab3383ce53fe18d2b7d4b5c2c76d5a3e3
8b192149c33449e787649acec6e7cb3174f5b8beb5c3e80e504b01023f03
140300000800dc55334a07d341bec3000000603200000900000000000000
00002080ff81000000005845444255472e7368504b050600000000010001
0037000000ea0000000000
xxd -r -ps XEDBUG-zip-hex.txt XEDBUG.sh.zip (What you do to recreate the zip file from the hex code)
No attachments required.
|
My version: xed version 1.0.6. I don't see the problem, e-james. I don't know what to make of this What is it that you experienced? What I experienced that led me to submit this (as a bug?) was different. |
On 10/02/17 19:18, markfilipak wrote:
My version: xed version 1.0.6.
I don't see the problem, e-james. I don't know what to make of this
#HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH HJKKKKKKKKKKKKKKKKKKKKKKK---------PENULTIMATE LINE -----------KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK
#HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH HJKKKKKKKKKKKKKKKKKKKKKKKK------- LAST LINE----------KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK-01-2017_0215.mpg-na.avi"
What is it that you experienced?
What I experienced was different.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#61 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AX-tslgX3KUgtfZR40B_oXAyKavpgKF0ks5rbLgIgaJpZM4LK-zf>.
When I open the file with xed (1.0.6), I can't see the last line until I start editing. Other text editors (leafpad, gedit) seem to have no problem. Perhaps it's some unique characteristic of my system. If I remove a few lines, the problem disappears.
|
One more comment. From the replies in this thread, it appears that e-james's submittals were via email -- is that right, e-james? If so, it appears that e-james's attachment (via email) didn't wind up as an attachment here. I suggest that, if all that I've written is true, the proprietors of this github project submit it as a bug to the github site-maintainers. (Just trying to be a good net-citizen here, not trying to cast blame. Peace.) |
On 10/02/17 21:18, markfilipak wrote:
One more comment. From the replies in this thread, it appears that e-james's submittals were via email -- is that right, e-james? If so, it appears that e-james's attachment (via email) didn't wind up as an attachment here. I suggest that, if all that I've written is true, the proprietors of this github project submit it as a bug to the github site-maintainers. (Just trying to be a good net-citizen here, not trying to cast blame. Peace.)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#61 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AX-tsnKF3XSvoDuMVV6G0zR7_IpkVbjkks5rbNQvgaJpZM4LK-zf>.
Correct. I received comments and questions as emails, so I replied with emails. Like I said, I'm not familiar with the way github works.
|
You don't need any special file. In the terminal type
Then open text.txt with xed and with another editor, e.g. emacs. With xed the cursor cannot move beyond the third line because xed is hiding the final new line. With other editors it can also go to the fourth line. This behavior of xed can be frustrating if you are copy/pasting code, it won't copy the final new line. I believe this issue was originated from gedit 2 |
@eev2 That problem is solvable now in xed master. There is a gsettings key you can set the same as in gedit. Just turn off |
I think Geany solution is the best : showing CR and/or LF as icons at the end of each line and showing the cursor where new typing will go (at the end of the last line or at the end of a new line, as you want). And only CR/LF ICONS are registered, the position of the cursor doesn't matter and is not registered. Then, you don't need anymore to ask yourself where to place the cursor when the line ends with CR and/or LF. |
By the way, is xed able to use https://editorconfig.org configuration file ? |
I can reproduce this problem in xed 3.0.2 with a file created by
Note that the issue only appears when prefereces > Save > "Ensure Trailing Newline" is active (which it probably is by default). So I needed to switch this off as a workaround - which is a pity, because I would like to use this 'ensuring' feature at the same time as having the line displayed. |
This bug seems to be solved in xed 3.4.5. Someone else can confirm? |
No, still the same on Linux Mint (xed 3.4.5). When "Ensure Trailing Newline" is on, last line (new line) gets deleted on save. |
When opening a text file, xed is not displaying the ending \x0D\x0A (blank line at the end of the file). The visible cursor cannot be 'pushed' past the end of the last populated line. If I add an end-of-line at the end-of-file, the file winds up with 2 blank lines at the end-of-file.
Please display the entire file as it exists. Don't "beautify" it.
The text was updated successfully, but these errors were encountered: