minor: Require both the existence of a target and check_workspace to be false to restart package-wide flycheck

This commit is contained in:
Ali Bektas 2024-09-27 02:40:53 +02:00
parent 2f55a91552
commit aeed8f89a3

View file

@ -380,7 +380,7 @@ fn run_flycheck(state: &mut GlobalState, vfs_path: VfsPath) -> bool {
if id == flycheck.id() {
updated = true;
match package.filter(|_| {
!world.config.flycheck_workspace(source_root_id) || target.is_some()
!world.config.flycheck_workspace(source_root_id) && target.is_some()
}) {
Some(package) => flycheck
.restart_for_package(package, target.clone().map(TupleExt::head)),