kate does not show newline inserted at the beginning

Bug #184675 reported by Sergei Ivanov
4
Affects Status Importance Assigned to Milestone
kdelibs
Won't Fix
Medium
kdelibs (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

This was already reported as bug #146306 (which is closed as unreproducible). I have this issue on Gutsy with current kdelibs (kdelibs4c2a-3.5.8-0ubuntu3.1).

To reproduce: run Kate on a file with more lines than kate's window has (this is essential), then hit Enter at the beginning of the file. Kate inserts a line but does not display it (until you hit Uparrow or something similar).

This also happens if it is not the beginning of the file but the beginning of the visible part. You can hit Enter several times and still see no effect (as if the key did not work). Same behavior with Kile instead of Kate.

The bug was introduced at some point between KDE 3.5.5 and KDE 3.5.8. The following patch fixes it.

--- kdelibs-3.5.8/kate/part/katesupercursor.cpp.orig 2007-05-14 11:52:27.000000000 +0400
+++ kdelibs-3.5.8/kate/part/katesupercursor.cpp 2008-01-20 16:39:19.000000000 +0300
@@ -186,7 +186,7 @@
 {
   if (newLine)
   {
- if (m_line > int(line) || (m_line == int(line) && m_col >= int(col)))
+ if (m_line > int(line) || (m_line == int(line) && m_col > int(col)))
     {
       if(m_line == int(line))
          m_col -= col;

Tags: patch

Related branches

Changed in kdelibs:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Cesare Tirabassi (norsetto) wrote :

Thanks for this. I can confirm the bug but this patch doesn't seem to solve it for me.

Revision history for this message
Sergei Ivanov (svivanov) wrote :

If my copy-pasting broke the patch, see the attached one here. It still works for me, now with kdelibs-3.5.8-0ubuntu3.2.
I apply it before running anything from debian/rules. Here is what I do:

apt-get source kdelibs
patch -d kdelibs-3.5.8 -p1 < newline.patch
cd kdelibs-3.5.8
debuild -us -uc -b
sudo dpkg -i kdelibs4c2a_3.5.8-0ubuntu3.2_i386.deb

Note that the affected fragment is in some obscure shared library which may be loaded via dlopen(). If you install the new version in /usr/local, the old one could still be used. It also makes sense to restart KDE to get rid of preloaded stuff (it works for me without restarting but generally KDE does not support live upgrading).

Revision history for this message
Cesare Tirabassi (norsetto) wrote :

My bad, I installed through upgrade and didn't notice that kdelibs4c2a was held back. Yes, I can confirm that it works (using 4:3.5.8-4ubuntu6), I'm subscribing u-m-s in case they care to include this with the next update, but note that this was fixed for KDE 4 (http://bugs.kde.org/show_bug.cgi?id=146300).

Revision history for this message
Sergei Ivanov (svivanov) wrote : Re: [Bug 184675] Re: kate does not show newline inserted at the beginning

On Tuesday 29 January 2008, Cesare Tirabassi wrote:
> My bad, I installed through upgrade and didn't notice that kdelibs4c2a
> was held back. Yes, I can confirm that it works (using
> 4:3.5.8-4ubuntu6), I'm subscribing u-m-s in case they care to include
> this with the next update, but note that this was fixed for KDE 4
> (http://bugs.kde.org/show_bug.cgi?id=146300).

Thanks. I hope KDE3 will be packaged and supported for a while (at this stage KDE4
is far from being usable for real work).

Changed in kdelibs:
status: Unknown → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package kdelibs - 4:3.5.8-4ubuntu11

---------------
kdelibs (4:3.5.8-4ubuntu11) hardy; urgency=low

  * Add patch kubuntu_98_kate_newline.diff from Sergei Ivanov
    <email address hidden>, closes LP: #184675 "kate does not show
    newline inserted at the beginning"

 -- Jonathan Riddell <email address hidden> Fri, 08 Feb 2008 14:04:02 +0000

Changed in kdelibs:
status: Confirmed → Fix Released
Changed in kdelibs:
status: Confirmed → Fix Released
Changed in kdelibs:
status: Fix Released → Confirmed
Changed in kdelibs:
status: Confirmed → Won't Fix
Changed in kdelibs:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.