Skip to content

Commit

Permalink
Redo completion when deleting
Browse files Browse the repository at this point in the history
Fixes #297
  • Loading branch information
Code7R committed Oct 27, 2024
1 parent 2234ab7 commit 2a41893
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions src/yinputline.cc
Original file line number Diff line number Diff line change
Expand Up @@ -333,23 +333,27 @@ bool YInputLine::handleKey(const XKeyEvent &key) {
}
break;
case XK_BackSpace:
auto done = false;
if (m & ControlMask) {
if (m & ShiftMask) {
if (deleteToBegin())
return true;
} else {
if (deletePreviousWord())
return true;
done = (m & ShiftMask) ? deleteToBegin()
: deletePreviousWord();
} else
done = deletePreviousChar();

if (done) {
if (toolTipVisible()) {
// must kill the timer!
toolTipVisibility(false);
goto simu_tab;
}
} else {
if (deletePreviousChar())
return true;
return true;
}
break;
}
}
break;
case XK_Tab:
simu_tab:
complete();
break;
default:
Expand Down

0 comments on commit 2a41893

Please sign in to comment.