How to tell the editor is in a special mode?

Hello,

For my AutoNewline plugin, I am installing a custom EditorAction for {, }, ; , . , and TAB.

The problem I have is I don't know how to detect when the Editor is in a special mode, e.g. the Incremental Search.

I don't want to do my special actions unless I'm in the regular edit mode. I am checking that editor != null, but other than that, I don't know what to check.

Thanks for any help,
-Alex

0
1 comment


I have the same problem when I override TAB. When I override TAB, the TAB key behaves wierd in the special mode, e.g. for cycling through the template parameters of a live tmeplate with TAB and SHIFT+TAB.

What I am doing is creating an TabEditorAction which is bound to the TAB key:

            
        
]]>


I leave the TAB key bound to the Next Template Variable, but there is a problem. With this example:

Initally, variable 'i' is highlighted. When I press TAB, the focus moves to variable 'requests'. This variable pops up a choice menu since there are multiple choices that are possible. If I press TAB here, then the text gets messed up. If I press SPACE here, it continues on, changing the focus to 'Object'. I think the problem is that the special mode isn't consuming the TAB character when it pops down the popup menu.

If I remove the AutoNewline plugin, then I can hit TAB or SPACE, and it will move to 'Object'.

I would like to be able to detect when the editor is in these special modes, and then call the default Tab Editor Handler or ?? in order to handle the special mode.

Any ideas?

0

Please sign in to leave a comment.