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

List:       kwrite-devel
Subject:    [Bug 104382] New: indentation of case label with trailing comment
From:       Leo Savernik <l.savernik () aon ! at>
Date:       2005-04-22 15:30:34
Message-ID: 20050422173032.104382.l.savernik () aon ! at
[Download RAW message or body]

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=104382         
           Summary: indentation of case label with trailing comment not
                    lined up properly
           Product: kate
           Version: unspecified
          Platform: Compiled Sources
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: NOR
         Component: general
        AssignedTo: kwrite-devel kde org
        ReportedBy: l.savernik aon at


Version:            (using KDE KDE 3.4.0)
Installed from:    Compiled From Sources

Using kate under KDE 3.4 with the C-style indenter, I hit the following bug:

Say I'm about entering a switch statement which maps many codes to one action:

switch(c) {
  case 1: // bla
  case 2: // bli
  case 5: // blu
    do_something_common();
    break;
  case 3: // wua
  case 6: // wia
    ...
}

When I try to enter this construct in kate, the following happens (| denotes the \
position of the caret):

switch(c) {
  case 1: // bla|

When I hit enter, I'll receive this:

switch(c) {
  case 1: // bla
    |

This is the first bug, but it gets better. Now I continue typing:

switch(c) {
  case 1: // bla
    case 2|

As soon as I type the colon, the case label is lined up correctly:

switch(c) {
  case 1: // bla
  case 2:|

Whew, all's well after all? Oh no. Now, I'll try to enter the comment

switch(c) {
  case 1: // bla
    case 2: /|

What's this? It's jumping into the wrong position again?

Therefore my proposal: Fix the indenting after pressing enter on case 1, and don't \
reindent on any input of any character in case 2. This should be the most generic way \
of fixing it.

Note that none of these bugs occur when I don't append trailing comments to the case \
labels. _______________________________________________
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