From 88d69e349b2332e5db15d187d4058d5b3b3f4d61 Mon Sep 17 00:00:00 2001 From: josephemorgan Date: Fri, 9 Jan 2026 13:35:44 -0800 Subject: [PATCH] feat(debugger): fix file URI handling for Windows in inspect event Ensure that file URIs starting with an extra slash on Windows are correctly normalized. --- lua/flutter-tools/runners/debugger_runner.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/flutter-tools/runners/debugger_runner.lua b/lua/flutter-tools/runners/debugger_runner.lua index b5df237..3dad6d9 100644 --- a/lua/flutter-tools/runners/debugger_runner.lua +++ b/lua/flutter-tools/runners/debugger_runner.lua @@ -146,6 +146,10 @@ local function handle_inspect_event(isolate_id) if location and location.file and location.line then local file = location.file:gsub("^file://", "") + if vim.loop.os_uname().sysname == "Windows_NT" then + -- On Windows, the file URI may start with an extra slash + file = file:gsub("^/", "") + end vim.schedule(function() vim.cmd("edit " .. vim.fn.fnameescape(file)) vim.api.nvim_win_set_cursor(0, { location.line, (location.column or 1) - 1 })