Skip to content
Merged
Show file tree
Hide file tree
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: 8 additions & 4 deletions app/frontend/src/components/GpuEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ const GpuEditor = forwardRef<GpuEditorHandle, Props>(function GpuEditor({
const minimapFetchRef = useRef<(first: number, last: number) => void>(() => {})
// Forward ref to runSearch (declared later) so edit paths above it can
// re-run the active find query without reordering the file.
const runSearchRef = useRef<() => Promise<void>>(async () => {})
const runSearchRef = useRef<(jump?: boolean) => Promise<void>>(async () => {})
const minimapFetchingRef = useRef(false)
const fontSizeRef = useRef<number>(fontSize)
const lastGotoLineRef = useRef<number | undefined>(undefined)
Expand Down Expand Up @@ -1142,7 +1142,7 @@ const GpuEditor = forwardRef<GpuEditorHandle, Props>(function GpuEditor({
fetchVisible()
draw()
void updateBracketMatch()
if (findOpenRef.current) void runSearchRef.current()
if (findOpenRef.current) void runSearchRef.current(false)
}, [draw, ensureCursorVisible, fetchVisible, invalidateDirtyLines, notifyCursor, notifyDirty, updateBracketMatch])

// Replace the identifier prefix immediately left of the cursor with the
Expand Down Expand Up @@ -1242,7 +1242,7 @@ const GpuEditor = forwardRef<GpuEditorHandle, Props>(function GpuEditor({

// Re-run editor.search with the current query/options and pick the match
// nearest the primary cursor as "current". Fire-and-forget.
const runSearch = useCallback(async () => {
const runSearch = useCallback(async (jump = true) => {
const query = findQueryRef.current
if (!query) {
matchesRef.current = []
Expand Down Expand Up @@ -1270,8 +1270,12 @@ const GpuEditor = forwardRef<GpuEditorHandle, Props>(function GpuEditor({
currentMatchRef.current = -1
setCurrentMatch(-1)
draw()
} else {
} else if (jump) {
jumpToMatch(idx)
} else {
currentMatchRef.current = idx
setCurrentMatch(idx)
draw()
}
} catch {
matchesRef.current = []
Expand Down
6 changes: 1 addition & 5 deletions app/frontend/src/components/Terminal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -912,11 +912,7 @@ export default function Terminal({
// input. Positioned above the block list ('top') or below it (default/'bottom').
const inputRow = (
<div
className={[
'term-input-row flex items-stretch min-h-9 shrink-0',
commandAlignment === 'top' ? 'border-b' : 'border-t',
'border-[var(--border-color)]',
].join(' ')}
className="term-input-row flex items-stretch min-h-9 shrink-0"
>
<span className={`term-dot term-dot--${isPtyActive || isCommandRunning ? 'running' : 'idle'}`} />
<span className="term-cwd">{barPath}</span>
Expand Down
Loading