How to align line to another line in JOSM?

I have two lines connected like so:

\
 \
  \
   |
   |
   |
   |

In JOSM, how can I align them to be in a straight line, but keep the vertical lines orientation so only the diagonal line moves to be in line with the vertical line?

Use the Align Ways Plugin.

  1. Activate the mode, click on the crooked way
  2. click on the joint to set is as pivot
  3. Ctrl-click on straight way to set is as reference
  4. then do Shift+Space to apply
  5. Done!.