rherrmann / gonsole

Gonsole - Git Console for the Eclipse IDE
http://gonsole.codeaffine.com
38 stars 10 forks source link

Cursor jumps to end of line while editing #36

Closed rherrmann closed 10 years ago

rherrmann commented 10 years ago

For example, type commit "message" and then try to insert the missing -m between commit and message. You will notice that the cursor is placed at the end of the line after each char that you typed.

rherrmann commented 10 years ago

Testcase (insert into GitConsoleInputPDETest)

  @Test
  public void testCorrectEnteredCommand() {
    String repositoryName = "repo";
    console.open( configurer.createConfigurer( repositoryName ) );

    console.typeText( "commit msg" );
    console.positionCaret( ( repositoryName + PROMPT_POSTFIX + "commit").length() );
    console.typeText( " " );
    new DisplayHelper().flushPendingEvents();
    console.typeText( "-" );
    new DisplayHelper().flushPendingEvents();
    console.typeText( "m" );
    new DisplayHelper().flushPendingEvents();

    assertThat( console )
      .containsLines( line( "repo", "commit -m msg" ) );
  }