Fix popup mode error display - respect configured mode setting#253
Conversation
|
@jellydn 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs. I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review. |
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
|
for more information, see https://pre-commit.ci
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
Co-authored-by: jellydn <870029+jellydn@users.noreply.github.com>
The error handling in hurl.nvim was hardcoded to use split mode, ignoring the user's configured popup mode setting. When a Hurl command failed (e.g., HTTP version mismatch, assertion failures), errors were always displayed in split view even when the user had explicitly configured popup mode.
Root Cause:
In
lua/hurl/lib/hurl_runner.lualines 357-358, the error handling code was hardcoded:Solution:
Updated the error handling to respect the configured mode dynamically:
Additional Changes:
pcallfor consistency with existing codebase patterns (matchinghistory.lua:24andmain.lua:381)Testing:
Users can verify the fix by:
mode = 'popup'in their hurl.nvim configurationFixes #249.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.