I have these keys bound to the builtin command write_and_auto_tab, all with MDFR_NONE:
| '\t','}',')','\n',']','#',';'
|
Most of them work fine all of the time, except for the '#' key. If it is the first non-whitespace character in a file, 4coder will crash on attempting to type it. The VS debugger shows that find_anchor_token in 4coder_auto_indent.cpp is where the crash takes place because of an attempt to dereference a null pointer returned by get_first_token_at_line. Further investigation also reveals that certain other symbols such as '$' will crash at the same place when bound to write_and_auto_tab. Alphanumeric characters such as 'm' and '4' will
also crash when bound, but in get_indent_lines_whole_tokens instead of in find_anchor_token. The crash is still due to the same problem of dereferencing a null pointer returned by get_first_token_at_line.
As you can imagine, this causes some headaches for me since most of my files start with an #include or #pragma. I've unbound the '#' key from auto-indenting for now. Can anyone else reproduce this problem?