[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-08-10 22:47:02
Message-ID: CADFtesA2MvoHjtynras0=SxaDkfJaaQyAqPeE9bhYK4j2WPNwQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


I added some tests for the Kate's folding. A feedback would be great,
to know if I'm going into the right direction. :-)

Thank you,
Adrian

p.s.: I still have no solution for "dyn wrap = false" problem

On Wed, Aug 10, 2011 at 6:37 PM, Adrian Lungu <adrian.lungu89@gmail.com>wrote:

>
>
> On Wed, Aug 10, 2011 at 2:35 PM, Milian Wolff <mail@milianw.de> wrote:
>
>> Adrian Lungu, 10.08.2011:
>> > 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"?
>>
>> that sounds wrong to me - highlighting should work with dyn word wrap
>> after
>> all...
>>
>
> So.. is there a bug in hl or dyn wrap? Who knows how this works and can
> take
> a look?
>
>
> --
> Adrian Lungu
> Student @ Computer Science and Engineering - "Politehnica" University of
> Bucharest
>



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

[Attachment #5 (text/html)]

I added some tests for the Kate&#39;s folding. A feedback would be great,<br>to know \
if I&#39;m going into the right direction. :-)<br><br>Thank \
you,<br>Adrian<br><br>p.s.: I still have no solution for &quot;dyn wrap = false&quot; \
problem<br> <br><div class="gmail_quote">On Wed, Aug 10, 2011 at 6:37 PM, Adrian \
Lungu <span dir="ltr">&lt;<a \
href="mailto:adrian.lungu89@gmail.com">adrian.lungu89@gmail.com</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; \
border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"> <br><br><div \
class="gmail_quote"><div><div></div><div class="h5">On Wed, Aug 10, 2011 at 2:35 PM, \
Milian Wolff <span dir="ltr">&lt;<a href="mailto:mail@milianw.de" \
target="_blank">mail@milianw.de</a>&gt;</span> wrote:<br> <blockquote \
class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, \
204, 204); padding-left: 1ex;"> Adrian Lungu, 10.08.2011:<br>
<div>&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>
<br>
</div>that sounds wrong to me - highlighting should work with dyn word wrap after<br>
all...<br></blockquote></div></div><div><br>So.. is there a bug in hl or dyn wrap? \
Who knows how this works and can take <br>a look?<br></div></div><div><div></div><div \
class="h5"><br clear="all"><br>-- <br><div>Adrian Lungu</div> Student @ Computer \
Science and Engineering - &quot;Politehnica&quot; University of Bucharest<br>

</div></div></blockquote></div><br><br clear="all"><br>-- <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