]> git.sur5r.net Git - i3/i3/commitdiff
Error out early if there is nothing to move
authorMichael Stapelberg <michael@stapelberg.de>
Thu, 27 Oct 2011 22:27:33 +0000 (23:27 +0100)
committerMichael Stapelberg <michael@stapelberg.de>
Thu, 27 Oct 2011 22:27:33 +0000 (23:27 +0100)
Fixes: #532
src/cmdparse.y

index 0144524b369ad4809aada3819d2e206f100a00cf..a1fb0473020af29634d011f07481e22d1c9eaae0 100644 (file)
@@ -762,6 +762,11 @@ move:
     {
         owindow *current;
 
+        /* Error out early to not create a non-existing workspace (in
+         * workspace_get()) if we are not actually able to move anything. */
+        if (match_is_empty(&current_match) && focused->type == CT_WORKSPACE)
+            break;
+
         printf("should move window to workspace %s\n", $3);
         /* get the workspace */
         Con *ws = workspace_get($3, NULL);