# \url wrapping extends into marginal notes space

This is a slightly odd one. I've been trying to get \url{} blocks to wrap really long URLs, and the only thing that seemed to work was to renew the \UrlBreaks command to allow breaking on practically all characters.

However, whilst that prevents the long URL from overlapping the page margins, it seems to still push characters into the marginal notes spaces (defined by \marginparsep and \marginparwidth).

The following document shows the problem:

\RequirePackage[hyphens]{url}
\documentclass[12pt]{article}

\usepackage[hyphens]{url}
\PassOptionsToPackage{hyphens}{url}
\usepackage{showframe}
\usepackage{blindtext}

\setlength\parindent{0pt}

\let\origUrlBreaks\UrlBreaks
\renewcommand*{\UrlBreaks}{\origUrlBreaks\do\a\do\b\do\c\do\d\do\e\do\f\do\g\do\h\do\i\do\j\do\k\do\l\do\m\do\n\do\o\do\p\do\q\do\r\do\s\do\t\do\u\do\v\do\w\do\x\do\y\do\z\do\A\do\B\do\C\do\D\do\E\do\F\do\G\do\H\do\I\do\J\do\K\do\L\do\M\do\N\do\O\do\P\do\Q\do\R\do\S\do\T\do\U\do\V\do\W\do\X\do\Y\do\Z\do\0\do\1\do\2\do\3\do\4\do\5\do\6\do\7\do\8\do\9\do\.\do\/\do\-\do\_\do\?\do\&\do\=}

\begin{document}

\blindtext

\url{http://really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-long-url.com}
\end{document}


When I compile it, half of the 'y' in really, and the entire '-' get pushed into the \marginparsep area. However, this does not seem to happen for blocks of regular text. See here:

Does anyone know why this happens, and what to do to fix it?

-

\Urlmuskip = 0mu plus 1mu