From 14226c264ef25176682170c93edace3384ff163b Mon Sep 17 00:00:00 2001
From: Sergios - Anestis Kefalidis <sergioskefalidis@gmail.com>
Date: Thu, 2 Sep 2021 13:15:07 +0300
Subject: [PATCH] Fix location cursor in shortcut view sometimes flickers on
 selection (Issue #644)

MR  !158

Issue #644
---
 thunar/thunar-shortcuts-view.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/thunar/thunar-shortcuts-view.c b/thunar/thunar-shortcuts-view.c
index 619b91c5f..c251f10f2 100644
--- a/thunar/thunar-shortcuts-view.c
+++ b/thunar/thunar-shortcuts-view.c
@@ -1702,8 +1702,9 @@ thunar_shortcuts_view_open (ThunarShortcutsView            *view,
 
       thunar_launcher_activate_selected_files (view->launcher, (ThunarLauncherFolderOpenAction) open_in, NULL);
 
-      /* return the focus to the current folder */
-      thunar_shortcuts_view_select_by_file (view, view->current_directory);
+      /* return the focus to the current folder, unless the folder changed */
+      if (open_in != THUNAR_LAUNCHER_CHANGE_DIRECTORY)
+        thunar_shortcuts_view_select_by_file (view, view->current_directory);
 
       if (file != NULL)
         g_object_unref (file);
-- 
GitLab