|Issues with AutoEdit Strategies [message #575213]
||Wed, 09 June 2010 00:15
| Henrik Lindberg
Registered: July 2009
I wondered about what could cause the auto edit strategies to behave in
strange ways. I found that when editing and starting a string (i.e.
typing ", nothing happened, but when I ended the string with ", it
automatically inserted a second " :-o
Found that this was caused because of unbalanced "" occurrences in the
document. This is what I had:
// TODO: X : fix the xxx
// TODO: Y : - " -
While looking for how to fix this, I looked at the strategies:
SingleLine and SameTerminal, and they both search through the entire
document. I was a bit surprised that the SingleLine strategy also
searched the entire doc. Are they supposed to?
As these strategies are looking at the entire text, there are many
a = "foo("; // '(' is counted
b = "\""; // all three " are counted
To be useful these strategies must be more elaborate - perhaps using a
strategy that if something is already consumed by a non keyword
terminal, it should not be counted, and adding escape char skip-count
functionality to allow "abc\"xyz to be correctly terminated without
getting the result "abc\xyz"".
Is there already an issue for this? 302576 is closed with small fix that
does not detect the pathological cases above.
Do you want new issue logged?
Also found 302656 for improvement to Multiline auto edit strategy. There
a patch that is marked to have been released, but it does not work quite
Produces (| == the caret):
Hitting return at that point produces:
Which is both wrong, and badly formatted.
Should the issue be reopened, or do you want a new issue?
Powered by FUDForum
. Page generated in 0.01565 seconds