bug in java indentation

2007-05-02 Thread Tomas Golembiovsky
There seems to be a bug in java indentation. The maintainer (Cc'ed) is said
to be resigned, so I'm writing here. It is sort of special situation. Take
a look at the println() in the following:

public class Bug {
public static void main(String args[]) {
Foo.bar(new Baz() {
public void run() {
if (true) {
/*nothing here*/
}

while (true);
System.out.println(doh!);
}
});
}
}

And some findings - it indent's correctly if you:
 a) put the if .. { .. } on one line
 b) remove the if
 c) remove the while()
 d) add body to the while

--
Best regards,
Tomas Golembiovsky

--
||- - -
|
| Law of Algebra
| 
| You never catch on until after the test.
| 
|- - -


feedkeys() allowed in sandbox

2007-04-26 Thread Tomas Golembiovsky
Greetings mortals,

today somebody came to #vim, and pasted some modeline (containig joke or
such). He muttered something about not knowing what that means and left
before long. But (!) what I noticed is that feedkeys() was used as part of
foldexpression and it turned out that feedkeys() is allowed in sandbox,
which means malicious file can run arbitrary command via modeline like
this:

vim: fdm=expr fde=feedkeys(\\:!touch\ phantom_was_here\\cr)

I guess you can see the consequences. Is this known/intentional?

-- 

Best regards,
Tomas Golembiovsky

--
||- - -
|
| Alan's Law of Research
| 
| The theory is supported as long as the funds are.
| 
|- - -