Bug 53690

Summary: tag completion window is offset out of quanta window
Product: [Applications] kate Reporter: Kaleb Pederson <kibab>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: image showing behavior

Description Kaleb Pederson 2003-01-30 22:44:51 UTC
Version:           3.1 (using KDE KDE 3.1)
Installed from:    Compiled From Sources
Compiler:          gcc-3.2.1 -O3
OS:          Linux

When a start a tag with a "<" the code (tag) completion window pops up but not in quanta.  It pops up on the far right of my desktop.
Comment 1 Kaleb Pederson 2003-01-30 22:46:02 UTC
Created attachment 845 [details]
image showing behavior

Shows tag completion window outside of quanta window
Comment 2 András Manţia 2003-01-30 23:02:31 UTC
Subject: Re:  tag completion window is offset out of quanta window

Thanks, confirmed. Needs more investigation, but it may be a Kate bug. It does 
not happend if Dynamic Word Wrap is activated.

Andras

Comment 3 András Manţia 2003-01-31 21:56:16 UTC
This is a Kate bug and it is reproducible both with Quanta and the Kate XML plugins. 
It appears when the document is scrolled horizontally. If the line where the 
autocompletion box is invoked is longer than the visible area and it is scrolled eg. by 
10 chars, the completion box will appear at ~10 chars right to the Kate window. It is 
noticable only if you work with a Kate window small enough, otherwise the completion 
box would just dissappear from the screen (it's far at right) , so you may not even 
notice the bug. 
 
Andras 
Comment 4 Hamish Rodda 2003-02-01 03:42:43 UTC
Subject: kdelibs/kate/part

CVS commit by rodda: 

Fix cursorPosition() for non-wordwrap mode.

Needs a backport.

CCMAIL:53690-done@bugs.kde.org


  M +2 -2      kateviewinternal.cpp   1.174


--- kdelibs/kate/part/kateviewinternal.cpp  #1.173:1.174
@@ -811,5 +811,5 @@ QPoint KateViewInternal::cursorCoordinat
   
   uint y = viewLine * m_doc->viewFont.fontHeight;
-  uint x = cXPos - lineRanges[viewLine].startX + leftBorder->width();
+  uint x = cXPos - m_startX - lineRanges[viewLine].startX + leftBorder->width();
   
   return QPoint(x, y);