nixeagle / ooc-mode

9 stars 2 forks source link

YAIE #2 #18

Closed solson closed 14 years ago

solson commented 14 years ago

Expected indentation:

        match scancode {
            // Shift key press
            case 0x2A =>
                shift = true

            // Shift key release
            case 0xAA =>
                shift = false

            // Any other scan code
            case =>
                chr := (shift ? uppercase : lowercase)[scancode] as Char
                Bochs debug("Char: %c" format(chr))
                chr print()
        }

ooc-mode indentation:

        match scancode {
            // Shift key press
            case 0x2A =>
                shift = true

            // Shift key release
            case 0xAA =>
                shift = false

            // Any other scan code
            case =>
            chr := (shift ? uppercase : lowercase)[scancode] as Char
            Bochs debug("Char: %c" format(chr))
            chr print()
        }

Note that it doesn't indent for the final "default" case.

nixeagle commented 14 years ago

This seems to work for me

match scancode {
    // Shift key press
    case 0x2A =>
        shift = true

        // Shift key release
    case 0xAA =>
        shift = false

        // Any other scan code
    case =>
        chr := (shift ? uppercase : lowercase)[scancode] as Char
        Bochs debug("Char: %c" format(chr))
        chr print()
}

Are you doing something different with where the pointer is at? I really can't seem to replicate the described effect. However I've uncovered a bug where if I have the pointer at the end of chr := (shift ? uppercase : lowercase)[scancode] as Char and hit tab it will indent too far, but this does not look like what you are describing.

nixeagle commented 14 years ago

Indent extra lines after case statements.

Closed by 04ae19c1192aa6dfa9847a261ffea7c8dd0ce772