Index: wp-includes/js/wplink.js
===================================================================
--- wp-includes/js/wplink.js	(revision 23400)
+++ wp-includes/js/wplink.js	(working copy)
@@ -281,10 +281,27 @@
 				inputs.url.focus();
 		},
 		setDefaultValues : function() {
+			var selectedText,
+				textarea = wpLink.textarea;
+
 			// Set URL and description to defaults.
 			// Leave the new tab setting as-is.
 			inputs.url.val('http://');
 			inputs.title.val('');
+			if ( wpLink.isMCE() ) {
+				selectedText = tinyMCEPopup.editor.selection.getContent( { format: 'text' } );
+			} else {
+				if ( document.selection && wpLink.range ) {
+					selectedText = wpLink.range.text;
+				} else if ( typeof textarea.selectionStart !== 'undefined' ) {
+					selectedText = textarea.value.substring( textarea.selectionStart, textarea.selectionEnd );
+				}
+			}
+			if ( selectedText && ( selectedText = selectedText.replace( /^\s+|\s+$/g, '' ) ) ) {
+				if ( ! $('#search-panel').is(':visible') )
+					$('#internal-toggle').trigger('click');
+				inputs.search.val( selectedText ).trigger('keyup');
+			}
 
 			// Update save prompt.
 			inputs.submit.val( wpLinkL10n.save );
