Index: src/wp-admin/plugin-editor.php
===================================================================
--- src/wp-admin/plugin-editor.php	(revision 37215)
+++ src/wp-admin/plugin-editor.php	(working copy)
@@ -14,8 +14,9 @@
 	exit();
 }
 
-if ( !current_user_can('edit_plugins') )
+if ( ! current_user_can('edit_plugins') ) {
 	wp_die( __('You do not have sufficient permissions to edit plugins for this site.') );
+}
 
 $title = __("Edit Plugins");
 $parent_file = 'plugins.php';
@@ -43,6 +44,9 @@
 	$plugin = $plugin[0];
 }
 
+$plugin_arr = explode("/", $plugin, 2);
+$current_plugin = $plugin_arr[0];
+
 $plugin_files = get_plugin_files($plugin);
 
 if ( empty($file) )
@@ -92,8 +96,9 @@
 		check_admin_referer('edit-plugin-test_' . $file);
 
 		$error = validate_plugin($file);
-		if ( is_wp_error($error) )
+		if ( is_wp_error($error) ) {
 			wp_die( $error );
+		}
 
 		if ( ( ! empty( $_GET['networkwide'] ) && ! is_plugin_active_for_network($file) ) || ! is_plugin_active($file) )
 			activate_plugin($file, "plugin-editor.php?file=$file&phperror=1", ! empty( $_GET['networkwide'] ) ); // we'll override this later if the plugin can be included without fatal error
@@ -121,8 +126,9 @@
 		if ( preg_match('/\.([^.]+)$/', $real_file, $matches) ) {
 			$ext = strtolower($matches[1]);
 			// If extension is not in the acceptable list, skip it
-			if ( !in_array( $ext, $editable_extensions) )
+			if ( !in_array( $ext, $editable_extensions) ) {
 				wp_die(sprintf('<p>%s</p>', __('Files of this type are not editable.')));
+			}
 		}
 	}
 
@@ -214,12 +220,18 @@
 <?php
 	foreach ( $plugins as $plugin_key => $a_plugin ) {
 		$plugin_name = $a_plugin['Name'];
-		if ( $plugin_key == $plugin )
+		$plugin_name = esc_attr($plugin_name);
+		$plugin_key = esc_attr($plugin_key);
+		$plugin_key_arr = explode("/", $plugin_key, 2);
+		$plugin_slug = $plugin_key_arr[0];
+
+		if ( $plugin_slug == $current_plugin ) {
 			$selected = " selected='selected'";
-		else
+		}
+		else {
 			$selected = '';
-		$plugin_name = esc_attr($plugin_name);
-		$plugin_key = esc_attr($plugin_key);
+		}
+
 		echo "\n\t<option value=\"$plugin_key\" $selected>$plugin_name</option>";
 	}
 ?>
