-
- // this function should be used always [asierra060396]
- UpdatableInset * tli = owner->view()->theLockingInset();
- if (owner->view()->available() && tli && (keysym == XK_Escape)) {
- if (tli == tli->GetLockingInset()) {
- owner->view()->unlockInset(tli);
- owner->view()->text->CursorRight(owner->view());
- moveCursorUpdate(false);
- owner->showState();
- } else {
- tli->UnlockInsetInInset(owner->view(),
- tli->GetLockingInset(),true);
+
+ if (owner->view()->available()) {
+ // this function should be used always [asierra060396]
+ UpdatableInset * tli = owner->view()->theLockingInset();
+ if (tli && (keysym == XK_Escape)) {
+ if (tli == tli->GetLockingInset()) {
+ owner->view()->unlockInset(tli);
+ owner->view()->text->CursorRight(owner->view());
+ moveCursorUpdate(false);
+ owner->showState();
+ } else {
+ tli->UnlockInsetInInset(owner->view(),
+ tli->GetLockingInset(),true);
+ }
+ //return 0;
+ return FL_PREEMPT;