Do not clear highlighted symbol when hovering mouse over an unpaired symbol

This commit is contained in:
LagoLunatic 2024-11-28 17:00:43 -05:00
parent 5bffaa8b5b
commit dfa145e16c
1 changed files with 9 additions and 13 deletions

View File

@ -561,20 +561,16 @@ fn symbol_ui(
}
}
} else if response.hovered() {
ret = Some(if let Some(target_symbol) = symbol_diff.target_symbol {
if column == 0 {
DiffViewAction::SetSymbolHighlight(
Some(symbol_diff.symbol_ref),
Some(target_symbol),
)
} else {
DiffViewAction::SetSymbolHighlight(
Some(target_symbol),
Some(symbol_diff.symbol_ref),
)
}
ret = Some(if column == 0 {
DiffViewAction::SetSymbolHighlight(
Some(symbol_diff.symbol_ref),
symbol_diff.target_symbol,
)
} else {
DiffViewAction::SetSymbolHighlight(None, None)
DiffViewAction::SetSymbolHighlight(
symbol_diff.target_symbol,
Some(symbol_diff.symbol_ref),
)
});
}
ret