[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwrite-devel
Subject:    Re: Please check the unit tests ;)
From:       Adrian Lungu <adrian.lungu89 () gmail ! com>
Date:       2011-09-29 18:42:50
Message-ID: CADFtesCjBHG2nZCbXbE-_n8Fnc+psGtgC3X2Ah8A5CV34rEiKA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


I didn't take a closer look to the code path, but I can do that. I will try
to find out what is the difference between the code paths (when dynamic
word wrap is true and when it is false) and maybe there is our answer, too.

Greetings,
Adrian

On Thu, Sep 29, 2011 at 7:44 PM, Dominik Haumann <dhdev@gmx.de> wrote:

> Ok, finally back to this:
>
> I've looked into the test case, and yes, it only fails if dynamic word wrap
> is
> false. Adrian, you say, the highlighting is never called in this case. Did
> you
> look at the code path here? If so, in which line is it going wrong?
>
> We should find a fix for certain here, since it must be a bug.
>
> Greetings,
> Dominik
>
> On Wednesday, August 10, 2011 01:30:52 PM Adrian Lungu wrote:
> > Hi Christoph
> >
> > I took a look through the test and ran it many times. I am not so sure if
> > the
> > problem is folded related.
> >
> > view->config()->setDynWordWrap(dynWordWrap);
> >
> > In this line if "dynWordWrap" is "false" then kate's hl is never called.
> > Therefore
> > the folding tree is not built and that's why the folding is not working.
> >
> > When folding a node, KateBuffer::ensureHighlighted() is called for the
> > whole folded block, but here, because the hl was never called, that node
> > that should
> > fold doesn't exist.
> >
> > I can call ensureHighlighted() for the whole doc, each time a fold is
> > triggered,
> > to make sure that the document was parsed and the folding tree was built,
> > but
> > wouldn't be a little too time consuming? Also, it is ok that kate's hl is
> > never called
> > when "dynWordWrap" is set "false"?
> >
> > Greetings,
> > Adrian
> >
> > On Tue, Aug 9, 2011 at 5:11 PM, Christoph <cullmann@absint.com>wrote:
> > > Hi,
> > >
> > > the kateview_test seems to fail because of folding regressions/changes,
> > > please take a look.
>



-- 
Adrian Lungu
Student @ Computer Science and Engineering - "Politehnica" University of
Bucharest

[Attachment #5 (text/html)]

I didn&#39;t take a closer look to the code path, but I can do that. I will \
try<div>to find out what is the difference between the code paths (when \
dynamic</div><div>word wrap is true and when it is false) and maybe there is our \
answer, too.</div> <div><br></div><div>Greetings,</div><div>Adrian</div><br><div \
class="gmail_quote">On Thu, Sep 29, 2011 at 7:44 PM, Dominik Haumann <span \
dir="ltr">&lt;<a href="mailto:dhdev@gmx.de">dhdev@gmx.de</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex;"> Ok, finally back to this:<br>
<br>
I&#39;ve looked into the test case, and yes, it only fails if dynamic word wrap \
is<br> false. Adrian, you say, the highlighting is never called in this case. Did \
you<br> look at the code path here? If so, in which line is it going wrong?<br>
<br>
We should find a fix for certain here, since it must be a bug.<br>
<br>
Greetings,<br>
Dominik<br>
<div class="im"><br>
On Wednesday, August 10, 2011 01:30:52 PM Adrian Lungu wrote:<br>
&gt; Hi Christoph<br>
&gt;<br>
&gt; I took a look through the test and ran it many times. I am not so sure if<br>
&gt; the<br>
&gt; problem is folded related.<br>
&gt;<br>
&gt; view-&gt;config()-&gt;setDynWordWrap(dynWordWrap);<br>
&gt;<br>
&gt; In this line if &quot;dynWordWrap&quot; is &quot;false&quot; then kate&#39;s hl \
is never called.<br> &gt; Therefore<br>
&gt; the folding tree is not built and that&#39;s why the folding is not working.<br>
&gt;<br>
&gt; When folding a node, KateBuffer::ensureHighlighted() is called for the<br>
&gt; whole folded block, but here, because the hl was never called, that node<br>
&gt; that should<br>
&gt; fold doesn&#39;t exist.<br>
&gt;<br>
&gt; I can call ensureHighlighted() for the whole doc, each time a fold is<br>
&gt; triggered,<br>
&gt; to make sure that the document was parsed and the folding tree was built,<br>
&gt; but<br>
&gt; wouldn&#39;t be a little too time consuming? Also, it is ok that kate&#39;s hl \
is<br> &gt; never called<br>
&gt; when &quot;dynWordWrap&quot; is set &quot;false&quot;?<br>
&gt;<br>
&gt; Greetings,<br>
&gt; Adrian<br>
&gt;<br>
</div>&gt; On Tue, Aug 9, 2011 at 5:11 PM, Christoph &lt;<a \
href="mailto:cullmann@absint.com">cullmann@absint.com</a>&gt;wrote:<br> \
<div><div></div><div class="h5">&gt; &gt; Hi,<br> &gt; &gt;<br>
&gt; &gt; the kateview_test seems to fail because of folding regressions/changes,<br>
&gt; &gt; please take a look.<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Adrian \
Lungu</div>Student @ Computer Science and Engineering - &quot;Politehnica&quot; \
University of Bucharest<br>



_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic