mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-01 00:46:39 +01:00
* Fix FileDialog collection navigator only working on filename * Improve collection navigator pattern matching - Exclude Icon - Works with .exe, .pdb etc
This commit is contained in:
@@ -537,13 +537,18 @@ namespace Terminal.Gui {
|
||||
|
||||
private void UpdateCollectionNavigator ()
|
||||
{
|
||||
tableView.EnsureValidSelection ();
|
||||
var col = tableView.SelectedColumn;
|
||||
var style = tableView.Style.GetColumnStyleIfAny (tableView.Table.Columns [col]);
|
||||
|
||||
|
||||
var collection = tableView
|
||||
.Table
|
||||
.Rows
|
||||
.Cast<DataRow> ()
|
||||
.Select ((o, idx) => RowToStats (idx))
|
||||
.Select (s => s.FileSystemInfo.Name)
|
||||
.Select ((o, idx) => col == 0 ?
|
||||
RowToStats(idx).FileSystemInfo.Name :
|
||||
style.GetRepresentation (o [0])?.TrimStart('.'))
|
||||
.ToArray ();
|
||||
|
||||
collectionNavigator = new CollectionNavigator (collection);
|
||||
@@ -910,6 +915,10 @@ namespace Terminal.Gui {
|
||||
|
||||
this.pushingState = false;
|
||||
}
|
||||
|
||||
if (obj.NewCol != obj.OldCol) {
|
||||
UpdateCollectionNavigator ();
|
||||
}
|
||||
}
|
||||
|
||||
private bool TableView_KeyUp (KeyEvent keyEvent)
|
||||
|
||||
Reference in New Issue
Block a user