]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/textentry.cpp
Forgot to commit
[wxWidgets.git] / src / msw / textentry.cpp
index b763b5de8e9051f460441b936932a61e7d2be0a7..9c5a0fc93e49dccfe45a6464b4bc50b03ab67507 100644 (file)
@@ -243,6 +243,11 @@ bool wxTextEntry::CanRedo() const
 
 void wxTextEntry::SetInsertionPoint(long pos)
 {
+    // calling DoSetSelection(-1, -1) would select everything which is not what
+    // we want here
+    if ( pos == -1 )
+        pos = GetLastPosition();
+
     // be careful to call DoSetSelection() which is overridden in wxTextCtrl
     // and not just SetSelection() here
     DoSetSelection(pos, pos);
@@ -287,6 +292,7 @@ void wxTextEntry::GetSelection(long *from, long *to) const
 // auto-completion
 // ----------------------------------------------------------------------------
 
+#if wxUSE_OLE
 bool wxTextEntry::AutoCompleteFileNames()
 {
 #ifdef HAS_AUTOCOMPLETE
@@ -378,6 +384,7 @@ bool wxTextEntry::AutoComplete(const wxArrayString& choices)
     return false;
 #endif // HAS_AUTOCOMPLETE/!HAS_AUTOCOMPLETE
 }
+#endif // wxUSE_OLE
 
 // ----------------------------------------------------------------------------
 // editable state