Index: wp-admin/includes/template.php
===================================================================
--- wp-admin/includes/template.php	(revision 12833)
+++ wp-admin/includes/template.php	(working copy)
@@ -671,7 +671,10 @@
  * @param unknown_type $class
  * @return unknown
  */
-function _tag_row( $tag, $level, $class = '', $taxonomy = 'post_tag' ) {
+function _tag_row( $tag, $level, $taxonomy = 'post_tag' ) {
+		static $row_class = '';
+		$row_class = ($row_class == '' ? ' class="alternate"' : '');
+
 		$count = number_format_i18n( $tag->count );
 		if ( 'post_tag' == $taxonomy ) 
 			$tagsel = 'tag';
@@ -685,13 +688,14 @@
 		$count = ( $count > 0 ) ? "<a href='edit.php?$tagsel=$tag->slug'>$count</a>" : $count;
 
 		$pad = str_repeat( '&#8212; ', max(0, $level) );
-		$name = apply_filters( 'term_name', $pad . ' ' . $tag->name );
+		$name = apply_filters( 'term_name', $pad . ' ' . $tag->name, $tag );
 		$qe_data = get_term($tag->term_id, $taxonomy, object, 'edit');
 		$edit_link = "edit-tags.php?action=edit&amp;taxonomy=$taxonomy&amp;tag_ID=$tag->term_id";
 
 		$out = '';
-		$out .= '<tr id="tag-' . $tag->term_id . '"' . $class . '>';
+		$out .= '<tr id="tag-' . $tag->term_id . '"' . $row_class . '>';
 
+
 		$columns = get_column_headers('edit-tags');
 		$hidden = get_hidden_columns('edit-tags');
 		$default_term = get_option('default_' . $taxonomy);
@@ -780,8 +784,10 @@
 
 	$args = array('offset' => $start, 'number' => $pagesize, 'hide_empty' => 0);
 
-	if ( !empty( $searchterms ) )
+	if ( !empty( $searchterms ) ) {
 		$args['search'] = $searchterms;
+		add_filter('term_name', '_tag_rows_prepend_parents', 20, 2);
+	}
 
 	// convert it to table rows
 	$out = '';
@@ -791,23 +797,36 @@
 		$args['number'] = $args['offset'] = 0;
 
 		$terms = get_terms( $taxonomy, $args );
-		if ( !empty( $searchterms ) ) // Ignore children on searches.
-			$children = array();
-		else
-			$children = _get_term_hierarchy($taxonomy);
+		$children = _get_term_hierarchy($taxonomy);
 
-		// Some funky recursion to get the job done is contained within, Skip it for non-hierarchical taxonomies for performance sake
+		// Some funky recursion to get the job done(Paging & parents mainly) is contained within, Skip it for non-hierarchical taxonomies for performance sake
 		$out .= _term_rows($taxonomy, $terms, $children, $page, $pagesize, $count);
 	} else {
 		$terms = get_terms( $taxonomy, $args );
 		foreach( $terms as $term )
-			$out .= _tag_row( $term, 0, ++$count % 2 ? ' class="alternate"' : '', $taxonomy );
+			$out .= _tag_row( $term, 0, $taxonomy );
 	}
+	remove_filter('term_name', '_tag_rows_prepend_parents', 20, 2);
 
 	echo $out;
 	return $count;
 }
 
+function _tag_rows_prepend_parents($name, $term) {
+	$parent_ids = array();
+	$p = $term->parent;
+	while ( $p ) {
+		$my_parent = get_term( $p, $term->taxonomy );
+		$p = $my_parent->parent;
+		if ( in_array($p, $parent_ids) ) // Prevent parent loops.
+			break;
+		$parent_ids[] = $p;
+		$name = $my_parent->name . ' &#8212; ' . $name;
+	}
+
+	return $name;
+}
+
 function _term_rows( $taxonomy, $terms, &$children, $page = 1, $per_page = 20, &$count, $parent = 0, $level = 0 ) {
 
 	$start = ($page - 1) * $per_page;
@@ -837,21 +856,20 @@
 			unset($parent_ids);
 
 			$num_parents = count($my_parents);
-			$count -= $num_parents; // Do not include parents in the per-page count, This is due to paging issues with unknown numbers of rows.
 			while ( $my_parent = array_pop($my_parents) ) {
-				$output .=  "\t" . _tag_row( $my_parent, $level - $num_parents, ++$count % 2 ? ' class="alternate"' : '', $taxonomy );
+				$output .=  "\t" . _tag_row( $my_parent, $level - $num_parents, $taxonomy );
 				$num_parents--;
 			}
 		}
 
 		if ( $count >= $start )
-			$output .= "\t" . _tag_row( $term, $level, ++$count % 2 ? ' class="alternate"' : '', $taxonomy );
-		else
-			++$count;
+			$output .= "\t" . _tag_row( $term, $level, $taxonomy );
 
+		++$count;
+
 		unset($terms[$key]);
 
-		if ( isset($children[$term->term_id]) )
+		if ( isset($children[$term->term_id]) && empty($_GET['s']) )
 			$output .= _term_rows( $taxonomy, $terms, $children, $page, $per_page, $count, $term->term_id, $level + 1 );
 	}
 
@@ -2690,7 +2708,7 @@
 ?>
 </select>
 <input class="hide-if-js" type="text" id="metakeyinput" name="metakeyinput" tabindex="7" value="" />
-<a href="#postcustomstuff" class="hide-if-no-js" onclick="jQuery('#metakeyinput, #metakeyselect, #enternew, #cancelnew').toggle();return false;">
+<a href="#postcustomstuff" class="hide-if-no-js" onClick="jQuery('#metakeyinput, #metakeyselect, #enternew, #cancelnew').toggle();return false;">
 <span id="enternew"><?php _e('Enter new'); ?></span>
 <span id="cancelnew" class="hidden"><?php _e('Cancel'); ?></span></a>
 <?php } else { ?>
@@ -3367,7 +3385,7 @@
 				<?php wp_nonce_field( 'find-posts', '_ajax_nonce', false ); ?>
 				<label class="screen-reader-text" for="find-posts-input"><?php _e( 'Search' ); ?></label>
 				<input type="text" id="find-posts-input" name="ps" value="" />
-				<input type="button" onclick="findPosts.send();" value="<?php esc_attr_e( 'Search' ); ?>" class="button" /><br />
+				<input type="button" onClick="findPosts.send();" value="<?php esc_attr_e( 'Search' ); ?>" class="button" /><br />
 
 				<input type="radio" name="find-posts-what" id="find-posts-posts" checked="checked" value="posts" />
 				<label for="find-posts-posts"><?php _e( 'Posts' ); ?></label>
@@ -3377,7 +3395,7 @@
 			<div id="find-posts-response"></div>
 		</div>
 		<div class="find-box-buttons">
-			<input type="button" class="button alignleft" onclick="findPosts.close();" value="<?php esc_attr_e('Close'); ?>" />
+			<input type="button" class="button alignleft" onClick="findPosts.close();" value="<?php esc_attr_e('Close'); ?>" />
 			<input id="find-posts-submit" type="submit" class="button-primary alignright" value="<?php esc_attr_e('Select'); ?>" />
 		</div>
 	</div>
