News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Support Tab smart jump - V8

Started by Loaden, April 21, 2010, 05:08:30 PM

Previous topic - Next topic

Loaden

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.


I make a patch for this.


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

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

[attachment deleted by admin]

Loaden

V7: Rewrote AllowTabSmartJump(), some bug fix.
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;
}

Loaden

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?

Loaden

Fix Bug:
Quote
void cbStyledTextCtrl::OnKeyDown(wxKeyEvent& event)
{
    switch (event.GetKeyCode())
    {
        case WXK_TAB:
        {
            if (AutoCompActive())
                break;
When completion actived, need pause tab jump.