This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
After the source file that I'm currently editing reaches a certain size, a size that I have not determined yet, the editor fails to honor the indentation rules for the rest of the file. I have created a youtube video demonstrating what I'm talking about, link: http://www.youtube.com/watch?v=XWuvQZG9ZZQ . I am able to reproduce this %100 on 6.9, 6.9.1, and 7.0b2
Please, provide code example as text.
/* list.h - Simple doubly linked list implementation. * Copyright (c) 2011, Keith Plant. All rights reserved. * * This file is part of devnull. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * 3. Neither the name of the author nor the names of its contributors may * be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #if !defined(LIST_H) #define LIST_H #include <stddef.h> #include "prefetch.h" /** * struct list_head - linked list entry structure * @next: the next entry in the list * @prev: the previous entry in the list */ struct list_head { struct list_head *prev, *next; }; static inline void list_head_init(struct list_head *head) { head->next = head; head->prev = head; } #endif /* !defined(LIST_H) */
I'm not sure if this information makes any difference or not but I can reproduce this bug on 64-bit windows and 64-bit linux.
Please, provide text that you typed and position where you type d text and describe what is wrong.
The only thing special about the text that I was inputting was that they were functions with multi-line arguments. The first function I entered was before the existing list_head_init and was something similar to: void a(int arg1, int arg2) { } The editor properly aligned the arguments but, when I enter a very similar function after the list_head_init function, the multi-line arguments are not automatically aligned.
Or even the very same function for that matter.
Were you able to replicate this?
bug confirmed.
Simplified example: ----------8<------------- struct list_head { struct list_head *prev, *next; }; int foo(int a, int b) { } int boo(int a, int b) { } ----------8<------------- Inserting new line before second argument of boo is wrong indented.
fixed, change set: http://hg.netbeans.org/cnd-main/rev/bbe89b428596
Integrated into 'main-golden', will be available in build *201103160400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/bbe89b428596 User: Alexander Simon <alexvsimon@netbeans.org> Log: fixed Bug #196567 Text editor fails to honor indentation rules in certain cases.