Review Request 120760: Fix bug #340212: incorrect soft-tabs alignment after beginning-of-line

Christoph Cullmann cullmann at kde.org
Wed Nov 12 19:10:19 UTC 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/120760/#review70293
-----------------------------------------------------------

Ship it!


I think the changes makes sense and the code looks ok. Perhaps you could add a comment to the  eventuallyReplaceTabs  function explaining what it does. Would make it later easier to understand.
Perhaps even with some ref to bug .....
But it had no comment before, so that is no stopper and not your fault ;)

- Christoph Cullmann


On Nov. 12, 2014, 7:06 p.m., Michael Hansen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/120760/
> -----------------------------------------------------------
> 
> (Updated Nov. 12, 2014, 7:06 p.m.)
> 
> 
> Review request for Kate, KDE Frameworks and Christoph Cullmann.
> 
> 
> Repository: ktexteditor
> 
> 
> Description
> -------
> 
> Fix for incorrect soft-tabs alignment after beginning-of-line, by taking the current cursor position into account when expanding tabs to spaces.
> 
> This also now uses the indentation width rather than the tab width, as I see "Tab Width" as being the actual width of the \t character, and "Indentation width" as being the next alignment position for virtual indentation.  This more closely matches other editors (e.g. vim) which have similar indentation control.
> 
> 
> Diffs
> -----
> 
>   src/document/katedocument.h cc43d6ab033c3d5bcf5b90a18ef9c2dc78b220cf 
>   src/document/katedocument.cpp edcf7a430412d30ca2ed210465690bc8e2c42d5b 
> 
> Diff: https://git.reviewboard.kde.org/r/120760/diff/
> 
> 
> Testing
> -------
> 
> Typed the testcase in bug 340212 with various indent/tab width settings.  Only Soft Tab mode is affected by this change.
> 
> With Indent 4/Tab 4:
>     int     x;
>     string  y;
>     bool    z;
> 
> With Indent 4/Tab 8:
>     int     x;
>     string  y;
>     bool    z;
> 
> With Indent 8/Tab 8 (single [tab] on the first line):
>         int     x;
>         string  y;
>         bool    z;
> 
> 
> Thanks,
> 
> Michael Hansen
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20141112/1ed84f29/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list