Index: /trunk/src/org/openstreetmap/josm/actions/FollowLineAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/FollowLineAction.java	(revision 7121)
+++ /trunk/src/org/openstreetmap/josm/actions/FollowLineAction.java	(revision 7122)
@@ -6,4 +6,5 @@
 import java.awt.event.ActionEvent;
 import java.awt.event.KeyEvent;
+import java.util.Arrays;
 import java.util.Collection;
 import java.util.List;
@@ -13,4 +14,6 @@
 import org.openstreetmap.josm.actions.mapmode.DrawAction;
 import org.openstreetmap.josm.command.ChangeCommand;
+import org.openstreetmap.josm.command.SelectCommand;
+import org.openstreetmap.josm.command.SequenceCommand;
 import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
@@ -110,8 +113,7 @@
                 newFollower.addNode(newPoint);
             }
-            Main.main.undoRedo.add(new ChangeCommand(follower, newFollower));
-            osmLayer.data.clearSelection();
-            osmLayer.data.addSelected(newFollower);
-            osmLayer.data.addSelected(newPoint);
+            Main.main.undoRedo.add(new SequenceCommand(tr("Follow line"),
+                    new ChangeCommand(follower, newFollower),
+                    new SelectCommand(Arrays.asList(newFollower, newPoint))));
             // "viewport following" mode for tracing long features
             // from aerial imagery or GPS tracks.
Index: /trunk/src/org/openstreetmap/josm/command/SelectCommand.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/command/SelectCommand.java	(revision 7122)
+++ /trunk/src/org/openstreetmap/josm/command/SelectCommand.java	(revision 7122)
@@ -0,0 +1,53 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.command;
+
+import static org.openstreetmap.josm.tools.I18n.trn;
+
+import java.util.Collection;
+
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.data.osm.OsmPrimitive;
+
+/**
+ * Command that selects OSM primitives
+ *
+ * @author Landwirt
+ */
+public class SelectCommand extends Command {
+
+    /** the primitives to select when executing the command */
+    private final Collection<OsmPrimitive> newSelection;
+
+    /** the selection before applying the new selection */
+    private Collection<OsmPrimitive> oldSelection;
+
+    /**
+     * Constructs a new select command.
+     * @param newSelection the primitives to select when executing the command.
+     */
+    public SelectCommand(Collection<OsmPrimitive> newSelection) {
+        this.newSelection = newSelection;
+    }
+
+    @Override
+    public void fillModifiedData(Collection<OsmPrimitive> modified, Collection<OsmPrimitive> deleted, Collection<OsmPrimitive> added) {
+    }
+
+    @Override
+    public void undoCommand() {
+        Main.map.mapView.getEditLayer().data.setSelected(oldSelection);
+    }
+
+    @Override
+    public boolean executeCommand() {
+        oldSelection = Main.map.mapView.getEditLayer().data.getSelected();
+        Main.map.mapView.getEditLayer().data.setSelected(newSelection);
+        return true;
+    }
+
+    @Override
+    public String getDescriptionText() {
+        int size = newSelection != null ? newSelection.size() : 0;
+        return trn("Selected {0} object", "Selected {0} objects", size, size);
+    }
+}
