Spreadsheet: Treat Return as a cursor key in the cell editing delegate

This allows you to enter many rows of cells like so:

    1<return>2<return>3<return>...

Very cool! :^)
This commit is contained in:
Andreas Kling 2020-08-28 21:29:59 +02:00
parent c3b2495320
commit 64e448eef0

View file

@ -62,6 +62,7 @@ private:
case KeyCode::Key_Right:
case KeyCode::Key_Up:
case KeyCode::Key_Down:
case KeyCode::Key_Return:
return true;
default:
return false;
@ -106,9 +107,6 @@ private:
virtual RefPtr<Widget> create_widget() override
{
auto textbox = CellEditor::construct();
textbox->on_return_pressed = [this] {
commit();
};
textbox->on_escape_pressed = [this] {
rollback();
};