Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => CodeCompletion redesign => Topic started by: Loaden on April 21, 2010, 05:08:30 pm

Title: Support Tab smart jump - V8
Post by: Loaden on April 21, 2010, 05:08:30 pm
Maybe you have the function of eclipse,in eclipse editor,when you type "tab",and if the next char is one of ")]}",it will skip it.
(http://forums.codeblocks.org/index.php?action=dlattach;topic=12140.0;attach=4353;image)

I make a patch for this.
(http://forums.codeblocks.org/index.php?action=dlattach;topic=12406.0;attach=4618;image)

Related discussion: http://forums.codeblocks.org/index.php/topic,12140.15.html (http://forums.codeblocks.org/index.php/topic,12140.15.html)

V6: fix "()" problem in Archlinux OS.

[attachment deleted by admin]
Title: Re: Support Tab smart jump - V7
Post by: Loaden on May 02, 2010, 08:31:08 am
V7: Rewrote AllowTabSmartJump(), some bug fix.
Code
bool cbStyledTextCtrl::AllowTabSmartJump()
{
    const int pos = GetCurrentPos();
    if (pos == wxSCI_INVALID_POSITION)
        return false;

    const int style = GetStyleAt(pos);
    if (IsString(style) || IsCharacter(style) || IsComment(style) || IsPreprocessor(style))
        return !m_tabSmartJump;
    return true;
}
Title: Re: Support Tab smart jump - V8
Post by: Loaden on May 02, 2010, 09:44:15 am
V8: Change the caret color and width.
By the way, If press 'ESC' any time, will cancel current tab jump.

AND, I have a question: In wxScintilla, some people know how to draw a vertical line?
Title: Re: Support Tab smart jump - V8
Post by: Loaden on May 02, 2010, 05:22:12 pm
Fix Bug:
Quote
void cbStyledTextCtrl::OnKeyDown(wxKeyEvent& event)
{
    switch (event.GetKeyCode())
    {
        case WXK_TAB:
        {
            if (AutoCompActive())
                break;
When completion actived, need pause tab jump.