Author Topic: Support Tab smart jump - V8  (Read 9127 times)

Offline Loaden

  • Lives here!
  • ****
  • Posts: 1014
Support Tab smart jump - V8
« 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.


I make a patch for this.


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

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

[attachment deleted by admin]
« Last Edit: May 02, 2010, 09:42:10 am by Loaden »

Offline Loaden

  • Lives here!
  • ****
  • Posts: 1014
Re: Support Tab smart jump - V7
« Reply #1 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;
}

Offline Loaden

  • Lives here!
  • ****
  • Posts: 1014
Re: Support Tab smart jump - V8
« Reply #2 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?

Offline Loaden

  • Lives here!
  • ****
  • Posts: 1014
Re: Support Tab smart jump - V8
« Reply #3 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.