Browse Source

BUG: ctkConsole: Allow to replace if cursor at the beginning of the interactive area

If you were doing shift+home followed by another key, it wasn't working
because we didn't allow to type something if the cursor was equal to
the beginning of the Interactive Area

Co-authored-by: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>
Mayeul Chassagnard 8 years ago
parent
commit
967fc8a855
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Libs/Widgets/ctkConsole.cpp

+ 1 - 1
Libs/Widgets/ctkConsole.cpp

@@ -406,7 +406,7 @@ void ctkConsolePrivate::keyPressEvent(QKeyEvent* e)
   if(isMoveLeftWithinLine(e, moveOperation, moveMode))
     {
     text_cursor.movePosition(moveOperation, moveMode);
-    if (text_cursor.position() > this->InteractivePosition)
+    if (text_cursor.position() >= this->InteractivePosition)
       {
       this->Superclass::keyPressEvent(e);
       }