| Summary: | Kate should not show an extra new line at the end of files | ||
|---|---|---|---|
| Product: | [Applications] kate | Reporter: | Synthetic451 <bugs.kde.org.facelift226> |
| Component: | general | Assignee: | KWrite Developers <kwrite-bugs-null> |
| Status: | RESOLVED INTENTIONAL | ||
| Severity: | normal | CC: | christoph |
| Priority: | NOR | ||
| Version First Reported In: | 22.12.3 | ||
| Target Milestone: | --- | ||
| Platform: | Arch Linux | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | Picture of extra line in vs code | ||
|
Description
Synthetic451
2023-04-12 01:21:39 UTC
That is no bug, vim per default adds a trailing \n, therefore the file has 6 lines. Why does vim only show 5 lines when reopening the file then? In vim, I can not move the caret onto the 6th line, but in Kate I can. (In reply to Benjamin Xiao from comment #2) > Why does vim only show 5 lines when reopening the file then? In vim, I can > not move the caret onto the 6th line, but in Kate I can. Because vim handles that differently, try e.g. mcedit, it will show 6 lines, too. And just as a side note, e.g. Atom or Code handle this like we do, too. Created attachment 158029 [details]
Picture of extra line in vs code
Yes, I did notice this in Code already, but the difference is that the line counter is slightly grayed out to indicate that it isn't an actual line in the file. See the attachment.
I think this could be a nice enhancement to Kate to indicate that there isn't an extra blank line in the file.
(In reply to Benjamin Xiao from comment #5) > Created attachment 158029 [details] > Picture of extra line in vs code > > Yes, I did notice this in Code already, but the difference is that the line > counter is slightly grayed out to indicate that it isn't an actual line in > the file. See the attachment. > > I think this could be a nice enhancement to Kate to indicate that there > isn't an extra blank line in the file. But it is some extra line. That would just mean the last empty line is always highlighted, I fail to see why that make any sense, sorry. |