[kate] [Bug 450919] Kate adds newline at the end of file, and doesn't even show it
https://bugs.kde.org/show_bug.cgi?id=450919 Christoph Cullmann changed: What|Removed |Added Latest Commit||https://invent.kde.org/fram ||eworks/ktexteditor/commit/5 ||01f0b04178962e3524867588220 ||6449d7a1f8ea Resolution|--- |FIXED Status|ASSIGNED|RESOLVED --- Comment #8 from Christoph Cullmann --- Git commit 501f0b04178962e35248675882206449d7a1f8ea by Christoph Cullmann. Committed on 05/03/2022 at 18:17. Pushed by cullmann into branch 'master'. add new line on save inside the buffer this works like for stripping trailing spaces one now has the correct content in the buffer after save M +0-11 src/buffer/katetextbuffer.cpp M +0-14 src/buffer/katetextbuffer.h M +0-3src/document/katebuffer.cpp M +31 -15 src/document/katedocument.cpp M +3-2src/document/katedocument.h https://invent.kde.org/frameworks/ktexteditor/commit/501f0b04178962e35248675882206449d7a1f8ea -- You are receiving this mail because: You are watching all bug changes.
[kate] [Bug 450919] Kate adds newline at the end of file, and doesn't even show it
https://bugs.kde.org/show_bug.cgi?id=450919 Bug Janitor Service changed: What|Removed |Added Status|REOPENED|ASSIGNED --- Comment #7 from Bug Janitor Service --- A possibly relevant merge request was started @ https://invent.kde.org/frameworks/ktexteditor/-/merge_requests/310 -- You are receiving this mail because: You are watching all bug changes.
[kate] [Bug 450919] Kate adds newline at the end of file, and doesn't even show it
https://bugs.kde.org/show_bug.cgi?id=450919 Christoph Cullmann changed: What|Removed |Added CC||cullm...@kde.org --- Comment #6 from Christoph Cullmann --- e.g. vim doesn't show trailing or no-trailing newline at the end of a file at all. Even if it adds one. But yes, it would be nicer to show it. But no, in my eyes this is nothing urgent either. You can disable that behavior. It is normal to add the newline for most editors (beside mcedit), therefore the default seems OK, too. -- You are receiving this mail because: You are watching all bug changes.
[kate] [Bug 450919] Kate adds newline at the end of file, and doesn't even show it
https://bugs.kde.org/show_bug.cgi?id=450919 --- Comment #5 from Waqar Ahmed --- > What will happen if I go to the end of the file and add something at the very > end? Will that be added after or before the now-already-existing newline? It will be added where you add it. > What if I manually add a newline (which will look like it's the only newline > at the end of the last line, while in fact Kate had already added another > one)? Will there be one or two newline when saving? one. You see, this is something that the author of the file doesn't need to worry about. If the setting is enabled, the new line will be added at the end if it doesn't exist. Probably working as designed. If you don't like the feature, disable it and add newlines whenever you want. > How can I trust an editor that does not show me the contents of the thing I'm > editing reliably? I don't know. Maybe use another editor to see if it's 1:1, it works reliably for me during the 8+ hours I spend using it everyday. -- You are receiving this mail because: You are watching all bug changes.
[kate] [Bug 450919] Kate adds newline at the end of file, and doesn't even show it
https://bugs.kde.org/show_bug.cgi?id=450919 --- Comment #4 from php4...@gmail.com --- I strongly disagree with classifying this as "wishlist". There are two things here: 1. The fact that when you save and the contents are changed (whatever the changes are and even if it is as per the settings), the first time that happens a warning should be shown with a "don't show again" option. That I can understand classifying as wishlist. It is standard behavior that one expects from any decent software, but it can be considered a feature request. 2. The fact that when you save the file and add a newline at the end, that newline is not shown. It is not shown in the same way it is when you close and reopen the file. This is a bug, and I don't know whether you call it "critical" or not, but it's pretty bad: you are not showing the current content of the file as-is. That's definitely way above wishlist. What will happen if I go to the end of the file and add something at the very end? Will that be added after or before the now-already-existing newline? What if I manually add a newline (which will look like it's the only newline at the end of the last line, while in fact Kate had already added another one)? Will there be one or two newline when saving? How can I trust an editor that does not show me the contents of the thing I'm editing reliably? One thing is that it doesn't warn me when modifying upon saving because that obeys a setting, but not showing the current contents reliably is a huge bug. It is not just a feature that is missing. -- You are receiving this mail because: You are watching all bug changes.
[kate] [Bug 450919] Kate adds newline at the end of file, and doesn't even show it
https://bugs.kde.org/show_bug.cgi?id=450919 Dominik Haumann changed: What|Removed |Added Priority|NOR |VLO Severity|grave |wishlist -- You are receiving this mail because: You are watching all bug changes.
[kate] [Bug 450919] Kate adds newline at the end of file, and doesn't even show it
https://bugs.kde.org/show_bug.cgi?id=450919 --- Comment #3 from Waqar Ahmed --- Yeah, but nothing critcial. -- You are receiving this mail because: You are watching all bug changes.
[kate] [Bug 450919] Kate adds newline at the end of file, and doesn't even show it
https://bugs.kde.org/show_bug.cgi?id=450919 php4...@gmail.com changed: What|Removed |Added Status|RESOLVED|REOPENED Ever confirmed|0 |1 Resolution|NOT A BUG |--- --- Comment #2 from php4...@gmail.com --- Ok, everything else remains valid. Especially the part where the appended new line is not even shown. -- You are receiving this mail because: You are watching all bug changes.
[kate] [Bug 450919] Kate adds newline at the end of file, and doesn't even show it
https://bugs.kde.org/show_bug.cgi?id=450919 Waqar Ahmed changed: What|Removed |Added CC||waqar@gmail.com Status|REPORTED|RESOLVED Resolution|--- |NOT A BUG --- Comment #1 from Waqar Ahmed --- > When you save the file, a newline character is added for no reason at the end > of the file There is a reason. You can disable this setting here: Configure Kate -> Open/Save -> Auto append new line on save -- You are receiving this mail because: You are watching all bug changes.