\makeatletter \@ifpackagelater{algorithm2e}{2017/07/19}{}{% current version 2017/07/18 %%%%%%%%% block with a vertical line end by a little horizontal line \renewcommand{\algocf@Vline}[1]{% no vskip in between boxes but a strut to separate them, \strut\par\nointerlineskip% then interblock space stay the same whatever is inside it \algocf@push{\skiprule}% move to the right before the vertical rule \hbox{\kern-.4pt\vrule% %% \vtop{\algocf@push{\skiptext}%move the right after the rule \vtop{\algocf@addskiptotal #1}\Hlne}}\vskip\skiphlne% inside the block \algocf@pop{\skiprule