Selective sweeps are thought to play a significant role in shaping patterns of variability across genomes; accurate predictions of their effects are, therefore, important for understanding these patterns. A commonly used model of selective sweeps assumes that alleles sampled at the end of a sweep, and that fail to recombine with wild-type haplotypes during the sweep, coalesce instantaneously, leading to a simple expression for sweep effects on diversity. It is shown here that there can be a significant probability that a pair of alleles sampled at the end of a sweep coalesce during the sweep before a recombination event can occur, reducing their expected coalescent time below that given by the simple approximation. Expressions are derived for the expected reductions in pairwise neutral diversities caused by both single and recurrent sweeps in the presence of such within-sweep coalescence, although the effects of multiple recombination events during a sweep are only treated heuristically. The accuracies of the resulting expressions were checked against the results of simulations. For even moderate ratios of the recombination rate to the selection coefficient, the simple approximation can be substantially inaccurate. The selection model used here can be applied to favorable mutations with arbitrary dominance coefficients, to sex-linked loci with sex-specific selection coefficients, and to inbreeding populations. Using the results from this model, the expected differences between the levels of variability on X chromosomes and autosomes with selection at linked sites are discussed, and compared with data on a population of Drosophila melanogaster. Copyright © 2020 by the Genetics Society of America.