git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25647 
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
 
     int wText = DEFAULT_ITEM_WIDTH;
 
 
     int wText = DEFAULT_ITEM_WIDTH;
 
-    int hText = EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy);
     if ( m_windowStyle & wxTE_MULTILINE )
     {
         hText *= wxMax(GetNumberOfLines(), 5);
     }
     //else: for single line control everything is ok
 
     if ( m_windowStyle & wxTE_MULTILINE )
     {
         hText *= wxMax(GetNumberOfLines(), 5);
     }
     //else: for single line control everything is ok
 
+    // we have to add the adjustments for the control height only once, not
+    // once per line, so do it after multiplication above
+    hText += EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy) - cy;
+
     return wxSize(wText, hText);
 }
 
     return wxSize(wText, hText);
 }