Update 2025-07-16

This commit is contained in:
2025-07-16 15:33:59 +03:00
parent 1a19d1112b
commit eb47813a34
20 changed files with 553 additions and 248 deletions

View File

@@ -79,6 +79,7 @@
---@field skip_single_subdirectory_on_leave boolean Skip single subdir on leave
---@field smooth_scrolling boolean Whether to smoothly scroll or not
---@field scroll_delay number The scroll delay in seconds for smooth scrolling
---@field create_item_delay number Delay in seconds before revealing
---@field wraparound_file_navigation boolean Have wraparound navigation or not
-- The full configuration for the plugin
@@ -195,6 +196,7 @@ local DEFAULT_CONFIG = {
skip_single_subdirectory_on_leave = true,
smooth_scrolling = false,
scroll_delay = 0.02,
create_item_delay = 0.25,
wraparound_file_navigation = true,
}
@@ -1027,6 +1029,10 @@ end
local function get_sudo_edit_supported()
--
-- If the platform is Windows, return false immediately
-- as Windows does not have sudo
if ya.target_family() == "windows" then return false end
-- Call the "sudo --help" command and get the handle
--
-- The "2>&1" redirects the standard error
@@ -3363,7 +3369,7 @@ local function execute_create(item_url, is_directory, args, config)
end
-- Wait for a tiny bit for the file to be created
ya.sleep(10e-2)
ya.sleep(config.create_item_delay)
-- Reveal the created item
ya.emit("reveal", { tostring(item_url) })
@@ -4213,7 +4219,7 @@ local function handle_parent_arrow(args, config)
-- If smooth scrolling is not wanted,
-- call the function to execute the parent arrow command
if not config.smooth_scrolling then execute_parent_arrow(args) end
if not config.smooth_scrolling then return execute_parent_arrow(args) end
-- Otherwise, smooth scrolling is wanted,
-- so get the number of steps from the arguments given
@@ -4450,7 +4456,7 @@ local function handle_archive(args, config)
--
-- Wait for a tiny bit for the archive to be created
ya.sleep(10e-2)
ya.sleep(config.create_item_delay)
-- Reveal the archive
ya.emit("reveal", { archive_path })