Review Request: Fix bug in normal indenter.

View: New views
5 Messages — Rating Filter:   Alert me  

Review Request: Fix bug in normal indenter.

by Bugzilla from bbeschow@cs.tu-berlin.de :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/2138/
-----------------------------------------------------------

Review request for Kate.


Summary
-------

This patch fixes a bug in the normal indenter when tabs are enabled. The problem is that spaces are replaced by tabs, although the leading whitespace of the above line only consists of spaces.

The correct behavior should be to *always* copy the whitespace from the line above, regardless wheter tabs are enabled or not.

Note that this patch also respects the user's settings. When enabled, it removes extra whitespace from the beginning of the new line before copying whitespace from the above line.


This addresses bug unknown.
    https://bugs.kde.org/show_bug.cgi?id=unknown


Diffs
-----

  branches/KDE/4.3/kdelibs/kate/document/katetextline.h 1047635
  branches/KDE/4.3/kdelibs/kate/document/katetextline.cpp 1047635
  branches/KDE/4.3/kdelibs/kate/utils/kateautoindent.cpp 1047635

Diff: http://reviewboard.kde.org/r/2138/diff


Testing
-------


Thanks,

Bernhard

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

Re: Review Request: Fix bug in normal indenter.

by Bugzilla from bbeschow@cs.tu-berlin.de :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/2138/
-----------------------------------------------------------

(Updated 2009-11-11 18:10:06.984806)


Review request for Kate.


Changes
-------

created and linked a bug report


Summary
-------

This patch fixes a bug in the normal indenter when tabs are enabled. The problem is that spaces are replaced by tabs, although the leading whitespace of the above line only consists of spaces.

The correct behavior should be to *always* copy the whitespace from the line above, regardless wheter tabs are enabled or not.

Note that this patch also respects the user's settings. When enabled, it removes extra whitespace from the beginning of the new line before copying whitespace from the above line.


This addresses bug 214147.
    https://bugs.kde.org/show_bug.cgi?id=214147


Diffs
-----

  branches/KDE/4.3/kdelibs/kate/document/katetextline.h 1047635
  branches/KDE/4.3/kdelibs/kate/document/katetextline.cpp 1047635
  branches/KDE/4.3/kdelibs/kate/utils/kateautoindent.cpp 1047635

Diff: http://reviewboard.kde.org/r/2138/diff


Testing
-------


Thanks,

Bernhard

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

Re: Review Request: Fix bug in normal indenter.

by Bugzilla from ehamberg@gmail.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/2138/#review3056
-----------------------------------------------------------

Ship it!


looks good to me. i agree that one should copy the same white space as the line above uses, but i'm unsure what should be done if the line above uses tabs and the user turns on tab expansion (spaces instead of tabs).

- Erlend


On 2009-11-11 18:10:06, Bernhard Beschow wrote:

>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/2138/
> -----------------------------------------------------------
>
> (Updated 2009-11-11 18:10:06)
>
>
> Review request for Kate.
>
>
> Summary
> -------
>
> This patch fixes a bug in the normal indenter when tabs are enabled. The problem is that spaces are replaced by tabs, although the leading whitespace of the above line only consists of spaces.
>
> The correct behavior should be to *always* copy the whitespace from the line above, regardless wheter tabs are enabled or not.
>
> Note that this patch also respects the user's settings. When enabled, it removes extra whitespace from the beginning of the new line before copying whitespace from the above line.
>
>
> This addresses bug 214147.
>     https://bugs.kde.org/show_bug.cgi?id=214147
>
>
> Diffs
> -----
>
>   branches/KDE/4.3/kdelibs/kate/document/katetextline.h 1047635
>   branches/KDE/4.3/kdelibs/kate/document/katetextline.cpp 1047635
>   branches/KDE/4.3/kdelibs/kate/utils/kateautoindent.cpp 1047635
>
> Diff: http://reviewboard.kde.org/r/2138/diff
>
>
> Testing
> -------
>
>
> Thanks,
>
> Bernhard
>
>

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

Re: Review Request: Fix bug in normal indenter.

by Bugzilla from bbeschow@cs.tu-berlin.de :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



> On 2009-11-12 18:16:07, Erlend Hamberg wrote:
> > looks good to me. i agree that one should copy the same white space as the line above uses, but i'm unsure what should be done if the line above uses tabs and the user turns on tab expansion (spaces instead of tabs).

Well, the opposite problem was almost freakin' me out: Since I usually have tabs enabled, spaces were replaced by tabs - very annoying when you want a consistent structure in a random document. That's why I figured that normal indentation should always do a 1:1 copy of the previous indentation. IIRC, that's also how Kate 2.x worked.


- Bernhard


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/2138/#review3056
-----------------------------------------------------------


On 2009-11-11 18:10:06, Bernhard Beschow wrote:

>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/2138/
> -----------------------------------------------------------
>
> (Updated 2009-11-11 18:10:06)
>
>
> Review request for Kate.
>
>
> Summary
> -------
>
> This patch fixes a bug in the normal indenter when tabs are enabled. The problem is that spaces are replaced by tabs, although the leading whitespace of the above line only consists of spaces.
>
> The correct behavior should be to *always* copy the whitespace from the line above, regardless wheter tabs are enabled or not.
>
> Note that this patch also respects the user's settings. When enabled, it removes extra whitespace from the beginning of the new line before copying whitespace from the above line.
>
>
> This addresses bug 214147.
>     https://bugs.kde.org/show_bug.cgi?id=214147
>
>
> Diffs
> -----
>
>   branches/KDE/4.3/kdelibs/kate/document/katetextline.h 1047635
>   branches/KDE/4.3/kdelibs/kate/document/katetextline.cpp 1047635
>   branches/KDE/4.3/kdelibs/kate/utils/kateautoindent.cpp 1047635
>
> Diff: http://reviewboard.kde.org/r/2138/diff
>
>
> Testing
> -------
>
>
> Thanks,
>
> Bernhard
>
>

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

Re: Review Request: Fix bug in normal indenter.

by Bugzilla from cullmann@kde.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



> On 2009-11-12 18:16:07, Erlend Hamberg wrote:
> > looks good to me. i agree that one should copy the same white space as the line above uses, but i'm unsure what should be done if the line above uses tabs and the user turns on tab expansion (spaces instead of tabs).
>
> Bernhard Beschow wrote:
>     Well, the opposite problem was almost freakin' me out: Since I usually have tabs enabled, spaces were replaced by tabs - very annoying when you want a consistent structure in a random document. That's why I figured that normal indentation should always do a 1:1 copy of the previous indentation. IIRC, that's also how Kate 2.x worked.

Look ok for me, too.
Perhaps will make it easier to have consistent indentation of files.


- Christoph


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/2138/#review3056
-----------------------------------------------------------


On 2009-11-11 18:10:06, Bernhard Beschow wrote:

>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/2138/
> -----------------------------------------------------------
>
> (Updated 2009-11-11 18:10:06)
>
>
> Review request for Kate.
>
>
> Summary
> -------
>
> This patch fixes a bug in the normal indenter when tabs are enabled. The problem is that spaces are replaced by tabs, although the leading whitespace of the above line only consists of spaces.
>
> The correct behavior should be to *always* copy the whitespace from the line above, regardless wheter tabs are enabled or not.
>
> Note that this patch also respects the user's settings. When enabled, it removes extra whitespace from the beginning of the new line before copying whitespace from the above line.
>
>
> This addresses bug 214147.
>     https://bugs.kde.org/show_bug.cgi?id=214147
>
>
> Diffs
> -----
>
>   branches/KDE/4.3/kdelibs/kate/document/katetextline.h 1047635
>   branches/KDE/4.3/kdelibs/kate/document/katetextline.cpp 1047635
>   branches/KDE/4.3/kdelibs/kate/utils/kateautoindent.cpp 1047635
>
> Diff: http://reviewboard.kde.org/r/2138/diff
>
>
> Testing
> -------
>
>
> Thanks,
>
> Bernhard
>
>

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