From 437659fd4e865f7e5c4c3e22f72d93ea788f8fa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9F=D1=80=D0=B5=D0=B4=D1=80=D0=B0=D0=B3=20=D0=9D=D0=B8?= =?UTF-8?q?=D0=BA=D0=BE=D0=BB=D0=B8=D1=9B?= Date: Thu, 27 Jun 2024 23:39:40 +0200 Subject: [PATCH] simpler conditions --- plugin/rename_file.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/rename_file.py b/plugin/rename_file.py index d40ee50d5..d183b81d4 100644 --- a/plugin/rename_file.py +++ b/plugin/rename_file.py @@ -39,9 +39,9 @@ def is_enabled(self): def is_visible(self, dirs=None, files=None): if dirs is None and files is None: return True # show 'LSP: Rename File' in command palette - if dirs is not None: + if dirs: return len(dirs) == 1 # show 'LSP: Rename Folder' in sidebar - if files is not None: + if files: return len(files) == 1 # show 'LSP: Rename File' in sidebar return False