Index: /trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java	(revision 4374)
+++ /trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java	(revision 4375)
@@ -230,4 +230,5 @@
         descriptionText.appendItem(tr("<b>parent <i>expr</i></b> - all parents of objects matching the expression"));
         descriptionText.appendItem(tr("<b>(all)inDownloadedArea</b> - objects (and all its way nodes / relation members) in downloaded area"));
+        descriptionText.appendItem(tr("<b>(all)inView</b> - objects (and all its way nodes / relation members) in current view"));
         descriptionText.appendItem(tr("Use <b>|</b> or <b>OR</b> to combine with logical or"));
         descriptionText.appendItem(tr("Use <b>\"</b> to quote operators (e.g. if key contains <b>:</b>)")
Index: /trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java	(revision 4374)
+++ /trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java	(revision 4375)
@@ -16,4 +16,5 @@
 import org.openstreetmap.josm.actions.search.PushbackTokenizer.Range;
 import org.openstreetmap.josm.actions.search.PushbackTokenizer.Token;
+import org.openstreetmap.josm.data.Bounds;
 import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
@@ -724,16 +725,18 @@
 
     /**
-     * Matches data in source area ("downloaded area").
+     * Matches data within bounds.
      */
-    private static class InDataSourceArea extends Match {
-
-        private final java.awt.geom.Area dataSourceArea = Main.main.getCurrentDataSet().getDataSourceArea();
-        private final boolean all;
+    private abstract static class InArea extends Match {
+
+        protected abstract Bounds getBounds();
+        protected final boolean all;
+        protected final Bounds bounds;
 
         /**
          * @param all if true, all way nodes or relation members have to be within source area;if false, one suffices.
          */
-        public InDataSourceArea(boolean all) {
+        public InArea(boolean all) {
             this.all = all;
+            this.bounds = getBounds();
         }
 
@@ -743,5 +746,5 @@
                 return false;
             } else if (osm instanceof Node) {
-                return dataSourceArea.contains(((Node) osm).getCoor());
+                return bounds.contains(((Node) osm).getCoor());
             } else if (osm instanceof Way) {
                 Collection<Node> nodes = ((Way) osm).getNodes();
@@ -753,4 +756,34 @@
                 return false;
             }
+        }
+    }
+
+    /**
+     * Matches data in source area ("downloaded area").
+     */
+    private static class InDataSourceArea extends InArea {
+
+        public InDataSourceArea(boolean all) {
+            super(all);
+        }
+
+        @Override
+        protected Bounds getBounds() {
+            return new Bounds(Main.main.getCurrentDataSet().getDataSourceArea().getBounds2D());
+        }
+    }
+
+    /**
+     * Matches data in current map view.
+     */
+    private static class InView extends InArea {
+
+        public InView(boolean all) {
+            super(all);
+        }
+
+        @Override
+        protected Bounds getBounds() {
+            return Main.map.mapView.getRealBounds();
         }
     }
@@ -857,4 +890,8 @@
             else if ("allinDownloadedArea".equals(key))
                 return new InDataSourceArea(true);
+            else if ("inView".equals(key))
+                return new InView(false);
+            else if ("allinView".equals(key))
+                return new InView(true);
             else
                 return new Any(key, regexSearch, caseSensitive);
