[prev in list] [next in list] [prev in thread] [next in thread]
List: kwrite-devel
Subject: Re: Review Request 119445: fix bug #336854: Haskell wrong tab autoindentation
From: "Martin Walch" <walch.martin () web ! de>
Date: 2014-07-26 14:27:42
Message-ID: 20140726142742.4049.15538 () probe ! kde ! org
[Download RAW message or body]
--===============2413343536197518353==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
> On Juli 26, 2014, 1:25 nachm., Christoph Cullmann wrote:
> > Ship It!
The corresponding bug report has been expanded to more very similar issues. I guess \
it is a good idea to add those fixes to this patch before comitting. So I will update \
this entry as soon as I have completed all fixes.
- Martin
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/119445/#review63200
-----------------------------------------------------------
On Juli 23, 2014, 11:16 nachm., Martin Walch wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/119445/
> -----------------------------------------------------------
>
> (Updated Juli 23, 2014, 11:16 nachm.)
>
>
> Review request for Kate.
>
>
> Bugs: 336854
> http://bugs.kde.org/show_bug.cgi?id=336854
>
>
> Repository: kate
>
>
> Description
> -------
>
> The problem lies in the haskell auto-indenter (haskell.js). The JavaScript search \
> function for strings does not return a "virtual" position, but counts tabs as \
> single characters.
> To fix this, remove the leading whitespace with stripWhiteSpace() before getting \
> the position of the '|' character. Later add the virtual value of the leading \
> whitespace using the katepart API function document.firstVirtualColumn().
> This indenter is also in use by "Curry" and "Literate Curry". I hope the new \
> behaviour is also wanted in those two modes.
>
> Diffs
> -----
>
> part/script/data/indentation/haskell.js 281bf66
>
> Diff: https://git.reviewboard.kde.org/r/119445/diff/
>
>
> Testing
> -------
>
> Patch successfully applied to KDE/4.13, KDE/4.14 and master.
>
> Test case worked fine after patching.
>
>
> Thanks,
>
> Martin Walch
>
>
--===============2413343536197518353==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 7bit
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 \
solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;"> \
<tr> <td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/119445/">https://git.reviewboard.kde.org/r/119445/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <p style="margin-top: 0;">On Juli 26th, 2014, 1:25 nachm. UTC, <b>Christoph \
Cullmann</b> wrote:</p> <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;"> <pre style="white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Ship It!</p></pre> </blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">The \
corresponding bug report has been expanded to more very similar issues. I guess it \
is a good idea to add those fixes to this patch before comitting. So I will update \
this entry as soon as I have completed all fixes.</p></pre> <br />
<p>- Martin</p>
<br />
<p>On Juli 23rd, 2014, 11:16 nachm. UTC, Martin Walch wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: \
1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; \
-webkit-border-radius: 6px;"> <tr>
<td>
<div>Review request for Kate.</div>
<div>By Martin Walch.</div>
<p style="color: grey;"><i>Updated Juli 23, 2014, 11:16 nachm.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="http://bugs.kde.org/show_bug.cgi?id=336854">336854</a>
</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kate
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">The problem lies in the haskell auto-indenter \
(haskell.js). The JavaScript search function for strings does not return a "virtual" \
position, but counts tabs as single characters.</p> <p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">To \
fix this, remove the leading whitespace with stripWhiteSpace() before getting the \
position of the '|' character. Later add the virtual value of the leading whitespace \
using the katepart API function document.firstVirtualColumn().</p> <p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">This \
indenter is also in use by "Curry" and "Literate Curry". I hope the new behaviour is \
also wanted in those two modes.</p></pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Patch successfully applied to KDE/4.13, KDE/4.14 and \
master.</p> <p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Test case worked fine after patching.</p></pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>part/script/data/indentation/haskell.js <span style="color: \
grey">(281bf66)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/119445/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
--===============2413343536197518353==--
_______________________________________________
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