diff --git a/common/grid_tricks.cpp b/common/grid_tricks.cpp index 39b9dae97e..b0a848b2bc 100644 --- a/common/grid_tricks.cpp +++ b/common/grid_tricks.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include @@ -492,7 +493,13 @@ void GRID_TRICKS::onCharHook( wxKeyEvent& ev ) stripped.Replace( ROW_SEP, " " ); stripped.Replace( ROW_SEP_R, " " ); stripped.Replace( COL_SEP, " " ); - paste_text( stripped ); + + // Write to the CellEditControl if we can + if( wxTextEntry* te = dynamic_cast( ev.GetEventObject() ) ) + te->WriteText( stripped ); + else + paste_text( stripped ); + handled = true; } }