SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

Code Completion - Caret remains visible on <Esc> and navigating with cursor

Last post 01-16-2008 7:19 AM by kamatanay. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 01-05-2008 2:39 PM

    • borisw
    • Not Ranked
    • Joined on 01-05-2008
    • Posts 2

    Code Completion - Caret remains visible on <Esc> and navigating with cursor

     The caret in the SharpDevelop Editor remains visible when the <Esc> key is pressed to close the code completion drop down and a cursor key is used to navigate away from the current cursor position.

     Steps to reproduce:

    1. Open a C# source file.
    2. Type a character that opens the code completion drop down
    3. Press <Esc>
    4. Navigate the cursor using any of the cursor keys e.g. <down>
    5. You will see two "cursors" one vertical line and the "standard" blinking cursor.
    SharpDevelop version 3.0.0 build 2786
    Filed under: ,
  • 01-07-2008 2:39 AM In reply to

    • Yang
    • Not Ranked
    • Joined on 01-07-2008
    • Posts 2

    Re: Code Completion - Caret remains visible on <Esc> and navigating with cursor

    I cannt recreate your problem in #Develop2.2,1.2648.

  • 01-07-2008 9:38 AM In reply to

    • borisw
    • Not Ranked
    • Joined on 01-05-2008
    • Posts 2

    Re: Code Completion - Caret remains visible on <Esc> and navigating with cursor

     Hallo Yang,

    I just reproduced the issue in 2.2.1 build 2648 and I can confirm that the same problem is there as well. Please let me know what I can do to help reproducing the problem.

    Regards, Boris.

  • 01-10-2008 6:29 PM In reply to

    Re: Code Completion - Caret remains visible on <Esc> and navigating with cursor

     I'd just like to add I also frequently had this issue, but found it hard to properly reproduce. I think it depends on wether the caret is obscured by the completion window.

     

  • 01-15-2008 5:34 PM In reply to

    • kamatanay
    • Top 500 Contributor
    • Joined on 01-14-2008
    • Pune, India
    • Posts 6

    Re: Code Completion - Caret remains visible on <Esc> and navigating with cursor

    I just solved the problem by modifying the code:

    In TextArea.cs there is a method 'ExecuteDialogKey(Keys keyData)'.

    In that method, find a part of code that says:

    finally {
                        motherTextEditorControl.EndUpdate();
                        Caret.UpdateCaretPosition();
                    }
                    return true;

    and change it to :

    finally {
                        motherTextEditorControl.EndUpdate();
                        Caret.RecreateCaret();
                        Caret.UpdateCaretPosition();
                    }
                    return true;

    After that recompile the code and the problem will get solved.

    It worked for me, let me know if it works for you too.

  • 01-15-2008 6:00 PM In reply to

    • kamatanay
    • Top 500 Contributor
    • Joined on 01-14-2008
    • Pune, India
    • Posts 6

    Re: Code Completion - Caret remains visible on <Esc> and navigating with cursor

     How am I supposed to check-in the fix for this bug?

  • 01-16-2008 7:19 AM In reply to

    • kamatanay
    • Top 500 Contributor
    • Joined on 01-14-2008
    • Pune, India
    • Posts 6

    Re: Code Completion - Caret remains visible on <Esc> and navigating with cursor

    The solution which I posted earlier doesn't work on SharpDevelop version 3. In solve the problem in version 3, I commented following lines from 'HandleKeyPress(char ch)' method in 'SharpDevelopTextAreaControl.cs' :

                        if (codeCompletionWindow.ProcessKeyEvent(ch)) {
                            return true;
                        }
Page 1 of 1 (7 items)
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.