Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions lua/wire/cpulib.lua
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,11 @@ if CLIENT or TESTING then
-- Update highlighted lines
function CPULib.DebugUpdateHighlights(dontForcePosition)
if ZCPU_Editor then
-- Clear all highlighted lines
for tab=1,ZCPU_Editor:GetNumTabs() do
ZCPU_Editor:GetEditor(tab):ClearHighlightedLines()
end

-- Highlight current position
local currentPosition = CPULib.Debugger.PositionByPointer[CPULib.Debugger.Variables[CPULib.Debugger.PreferredTracker or "IP"]]
if currentPosition then
Expand All @@ -380,10 +385,6 @@ if CLIENT or TESTING then
if not currentPosition.File:sub(1,9):match("cpuchip/") then
return
end
-- Clear all highlighted lines
for tab=1,ZCPU_Editor:GetNumTabs() do
ZCPU_Editor:GetEditor(tab):ClearHighlightedLines()
end

local textEditor = CPULib.SelectTab(ZCPU_Editor,currentPosition.File,not CPULib.Debugger.FollowTracker)
if textEditor then
Expand Down Expand Up @@ -464,6 +465,7 @@ if CLIENT or TESTING then
CPULib.HandbookWindow = nil
-- Platform bookmarks, it'll automatically jump to this section when opening.
local bookmarks = {
ZCPU="",
ZGPU="#zgpu",
ZSPU="#zspu"
}
Expand All @@ -480,7 +482,7 @@ if CLIENT or TESTING then
browser:SetPos(10, 25)
browser:SetSize(w - 20, h - 35)

browser:OpenURL("https://wiremod.github.io/Miscellaneous/zcpudoc.html"..bookmarks[bookmark] or "")
browser:OpenURL("https://wiremod.github.io/Miscellaneous/zcpudoc.html"..(bookmarks[bookmark] or ""))
end
end

Expand Down